diff --git a/dmoj/settings.py b/dmoj/settings.py index 08e3896..826311e 100644 --- a/dmoj/settings.py +++ b/dmoj/settings.py @@ -203,6 +203,7 @@ else: }, ('judge.BlogPost', 'fa-rss-square'), ('judge.Comment', 'fa-comment-o'), + ('judge.Ticket', 'fa-exclamation-circle'), ('flatpages.FlatPage', 'fa-file-text-o'), ('judge.Solution', 'fa-pencil'), ], @@ -238,6 +239,7 @@ INSTALLED_APPS += ( 'django_jinja', 'chat_box', 'channels', + 'newsletter', ) MIDDLEWARE = ( @@ -514,4 +516,16 @@ CHANNEL_LAYERS = { "hosts": [('0.0.0.0', 6379)], }, }, -} \ No newline at end of file +} + + +NEWSLETTER_CONFIRM_EMAIL = False + +# Amount of seconds to wait between each email. Here 100ms is used. +NEWSLETTER_EMAIL_DELAY = 0.1 + +# Amount of seconds to wait between each batch. Here one minute is used. +NEWSLETTER_BATCH_DELAY = 60 + +# Number of emails in one batch +NEWSLETTER_BATCH_SIZE = 100 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 035bad7..9adbcce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,5 +33,6 @@ sqlparse channels channels-redis docker +django-newsletter python-memcached netaddr diff --git a/templates/newsletter/newsletter_list.html b/templates/newsletter/newsletter_list.html index 86b200c..8feeb70 100644 --- a/templates/newsletter/newsletter_list.html +++ b/templates/newsletter/newsletter_list.html @@ -2,23 +2,31 @@ {% block title %}Newsletter list - {{ SITE_LONG_NAME }}{% endblock %} {% block content_title %}Newsletter list{% endblock %} +{% block media %} + +{% endblock %} + {% block body %} {% if request.user.is_authenticated %}