bug fixes

- fix newsletters having a null pubdate
- fix unsubscribe link not working
- adjust worker and thread counts in docker compose
This commit is contained in:
Hugh Rundle 2025-04-22 17:39:12 +10:00
commit c214c993ed
Signed by: hugh
GPG key ID: A7E35779918253F9
3 changed files with 3 additions and 3 deletions

View file

@ -62,7 +62,7 @@ urlpatterns = [
name="confirm-subscribe-email",
),
path(
"unsubscribe-email/<token>/<id>",
"unsubscribe-email/<token>/<user_id>",
views.UnsubscribeEmail.as_view(),
name="unsubscribe-email",
),

View file

@ -24,7 +24,7 @@ class Newsletter(models.Model):
failing = models.BooleanField(default=False, blank=True, null=True)
updateddate = models.DateTimeField()
pubdate = models.DateTimeField(null=True, default=None)
pubdate = models.DateTimeField(null=True, default=timezone.now)
def __str__(self):
"""display for admin dropdowns"""

View file

@ -11,7 +11,7 @@ services:
env_file: .env
restart: unless-stopped
command: python manage.py runserver 0.0.0.0:8000 # only use in dev
# command: gunicorn --env DJANGO_SETTINGS_MODULE=ausglamr.settings ausglamr.wsgi --workers=10 --threads=4 -b 0.0.0.0:8000
# command: gunicorn --env DJANGO_SETTINGS_MODULE=ausglamr.settings ausglamr.wsgi --workers=4 --threads=3 -b 0.0.0.0:8000
volumes:
- .:/app
depends_on: