2 Commits

2 changed files with 43 additions and 1 deletions

42
pyproject.toml Normal file
View File

@@ -0,0 +1,42 @@
[project]
name = "kasu"
version = "4.230918"
description = "Homepage CMS for Kasu.at"
authors = [
{ name = "Christian Berg", email = "xeniac@xendynastie.at" }
]
requires-python = ">=3.8"
dependencies = ["beautifulsoup4",
"django < 5.0",
"django-appconf",
"django-ckeditor",
"django-contrib-comments",
"django-csp",
"django-compressor",
"django-extra-views",
"django-markdown",
"django-recaptcha",
"easy_thumbnails[svg]",
"icalendar",
"openpyxl",
"markdown",
"pillow",
"psycopg2-binary",
"PyJWT",
"pytz",
"requests",
"requests-oauthlib"
]
[project.optional-dependencies]
dev = [
"django-debug-toolbar",
"django-rosetta",
"sqlparse",
"pylint>=2.0",
"pylint-django"
]
[tool.setuptools.packages.find]
where = ["src"]

View File

@@ -165,7 +165,7 @@ class Event(models.Model):
self.location = master_event.location
self.url = master_event.url
self.image = self.image or master_event.image
self.photo_count = self.photo_set.count()
self.photo_count = self.photo_set.count() if self.pk else 0
super(Event, self).save(**kwargs)
# Update the Hanchans if necessary: