From ad85942c333c06e20d9098d0183754fd03f4c833 Mon Sep 17 00:00:00 2001 From: Tran Trong Nghia Date: Mon, 26 Dec 2022 18:11:02 +0700 Subject: [PATCH] README.md changes and newsletter removal --- README.md | 9 +--- dmoj/settings.py | 13 ------ dmoj/urls.py | 2 - judge/forms.py | 6 +-- judge/utils/subscription.py | 10 ---- judge/views/register.py | 9 ---- judge/views/user.py | 32 +------------ requirements.txt | 1 - templates/newsletter/common.html | 16 ------- templates/newsletter/message/message.html | 22 --------- templates/newsletter/message/message.txt | 15 ------ .../newsletter/message/message_subject.txt | 1 - templates/newsletter/message/subscribe.html | 20 -------- templates/newsletter/message/subscribe.txt | 9 ---- .../newsletter/message/subscribe_subject.txt | 1 - templates/newsletter/message/unsubscribe.html | 20 -------- templates/newsletter/message/unsubscribe.txt | 9 ---- .../message/unsubscribe_subject.txt | 1 - templates/newsletter/message/update.html | 20 -------- templates/newsletter/message/update.txt | 9 ---- .../newsletter/message/update_subject.txt | 1 - templates/newsletter/newsletter_detail.html | 13 ------ templates/newsletter/newsletter_list.html | 46 ------------------- templates/newsletter/submission_archive.html | 13 ------ .../newsletter/subscription_activate.html | 12 ----- .../newsletter/subscription_subscribe.html | 19 -------- .../subscription_subscribe_activated.html | 7 --- .../subscription_subscribe_email_sent.html | 8 ---- .../subscription_subscribe_user.html | 22 --------- .../newsletter/subscription_unsubscribe.html | 17 ------- .../subscription_unsubscribe_activated.html | 9 ---- .../subscription_unsubscribe_email_sent.html | 9 ---- .../subscription_unsubscribe_user.html | 25 ---------- templates/newsletter/subscription_update.html | 17 ------- .../subscription_update_activated.html | 9 ---- .../subscription_update_email_sent.html | 9 ---- templates/user/edit-profile.html | 10 ---- 37 files changed, 4 insertions(+), 467 deletions(-) delete mode 100644 judge/utils/subscription.py delete mode 100644 templates/newsletter/common.html delete mode 100644 templates/newsletter/message/message.html delete mode 100644 templates/newsletter/message/message.txt delete mode 100644 templates/newsletter/message/message_subject.txt delete mode 100644 templates/newsletter/message/subscribe.html delete mode 100644 templates/newsletter/message/subscribe.txt delete mode 100644 templates/newsletter/message/subscribe_subject.txt delete mode 100644 templates/newsletter/message/unsubscribe.html delete mode 100644 templates/newsletter/message/unsubscribe.txt delete mode 100644 templates/newsletter/message/unsubscribe_subject.txt delete mode 100644 templates/newsletter/message/update.html delete mode 100644 templates/newsletter/message/update.txt delete mode 100644 templates/newsletter/message/update_subject.txt delete mode 100644 templates/newsletter/newsletter_detail.html delete mode 100644 templates/newsletter/newsletter_list.html delete mode 100644 templates/newsletter/submission_archive.html delete mode 100644 templates/newsletter/subscription_activate.html delete mode 100644 templates/newsletter/subscription_subscribe.html delete mode 100644 templates/newsletter/subscription_subscribe_activated.html delete mode 100644 templates/newsletter/subscription_subscribe_email_sent.html delete mode 100644 templates/newsletter/subscription_subscribe_user.html delete mode 100644 templates/newsletter/subscription_unsubscribe.html delete mode 100644 templates/newsletter/subscription_unsubscribe_activated.html delete mode 100644 templates/newsletter/subscription_unsubscribe_email_sent.html delete mode 100644 templates/newsletter/subscription_unsubscribe_user.html delete mode 100644 templates/newsletter/subscription_update.html delete mode 100644 templates/newsletter/subscription_update_activated.html delete mode 100644 templates/newsletter/subscription_update_email_sent.html diff --git a/README.md b/README.md index 05c871e..ae36af5 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,6 @@ Support plagiarism detection via [Stanford MOSS](https://theory.stanford.edu/~ai Most of the setup are the same as DMOJ installations. You can view the installation guide of DMOJ here: https://docs.dmoj.ca/#/site/installation. There is one minor change: Instead of `git clone https://github.com/DMOJ/site.git`, you clone this repo `git clone https://github.com/LQDJudge/online-judge.git`. -### Additional Steps in Production: - -1. To use newsletter (email sending), go to admin and create a newsletter. -2. Change the domain name and website name in Admin page: Navigation Bars/Sites - ### Some frequent difficulties when installation: 1. Missing the `local_settings.py`. You need to copy the `local_settings.py` in order to pass the check. @@ -100,7 +95,7 @@ Most of the steps are similar to Django tutorials. Here are two usual steps: Leaderboard with information about contest rating, performance points and real name of all users. -![](https://i.imgur.com/ampxHXM.png) +![](https://i.imgur.com/SeUiXKQ.png) ### Admin dashboard @@ -118,4 +113,4 @@ You can write the problems' statement in Markdown with LaTeX figures and formula Users can communicate with each other and can see who's online. -![](https://i.imgur.com/y9SGCgl.png) +![](https://i.imgur.com/wvOjlLx.png) diff --git a/dmoj/settings.py b/dmoj/settings.py index aa21ee7..076ab39 100644 --- a/dmoj/settings.py +++ b/dmoj/settings.py @@ -98,7 +98,6 @@ MATHOID_CACHE_URL = False TEXOID_GZIP = False TEXOID_META_CACHE = "default" TEXOID_META_CACHE_TTL = 86400 -DMOJ_NEWSLETTER_ID_ON_REGISTER = 1 BAD_MAIL_PROVIDERS = () BAD_MAIL_PROVIDER_REGEX = () @@ -244,7 +243,6 @@ INSTALLED_APPS += ( "impersonate", "django_jinja", "chat_box", - "newsletter", "django.forms", ) @@ -468,17 +466,6 @@ FILE_UPLOAD_PERMISSIONS = 0o644 MESSAGES_TO_LOAD = 15 -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 - ML_OUTPUT_PATH = None try: diff --git a/dmoj/urls.py b/dmoj/urls.py index 6292098..aa77765 100644 --- a/dmoj/urls.py +++ b/dmoj/urls.py @@ -1146,7 +1146,5 @@ handler404 = "judge.views.error.error404" handler403 = "judge.views.error.error403" handler500 = "judge.views.error.error500" -if "newsletter" in settings.INSTALLED_APPS: - urlpatterns.append(url(r"^newsletter/", include("newsletter.urls"))) if "impersonate" in settings.INSTALLED_APPS: urlpatterns.append(url(r"^impersonate/", include("impersonate.urls"))) diff --git a/judge/forms.py b/judge/forms.py index 7ca8f29..7eef5d1 100644 --- a/judge/forms.py +++ b/judge/forms.py @@ -34,7 +34,7 @@ from judge.models import ( BlogPost, ContestProblem, ) -from judge.utils.subscription import newsletter_id + from judge.widgets import ( HeavyPreviewPageDownWidget, MathJaxPagedownWidget, @@ -65,10 +65,6 @@ class UserForm(ModelForm): class ProfileForm(ModelForm): - if newsletter_id is not None: - newsletter = forms.BooleanField( - label=_("Subscribe to contest updates"), initial=False, required=False - ) test_site = forms.BooleanField( label=_("Enable experimental features"), initial=False, required=False ) diff --git a/judge/utils/subscription.py b/judge/utils/subscription.py deleted file mode 100644 index 883d905..0000000 --- a/judge/utils/subscription.py +++ /dev/null @@ -1,10 +0,0 @@ -from django.conf import settings - -if "newsletter" in settings.INSTALLED_APPS: - from newsletter.models import Subscription -else: - Subscription = None - -newsletter_id = ( - None if Subscription is None else settings.DMOJ_NEWSLETTER_ID_ON_REGISTER -) diff --git a/judge/views/register.py b/judge/views/register.py index b305808..76e8267 100644 --- a/judge/views/register.py +++ b/judge/views/register.py @@ -17,7 +17,6 @@ from sortedm2m.forms import SortedMultipleChoiceField from judge.models import Language, Organization, Profile, TIMEZONE from judge.utils.recaptcha import ReCaptchaField, ReCaptchaWidget -from judge.utils.subscription import Subscription, newsletter_id from judge.widgets import Select2MultipleWidget, Select2Widget valid_id = re.compile(r"^\w+$") @@ -51,11 +50,6 @@ class CustomRegistrationForm(RegistrationForm): widget=Select2MultipleWidget(attrs={"style": "width:100%"}), ) - if newsletter_id is not None: - newsletter = forms.BooleanField( - label=_("Subscribe to newsletter?"), initial=True, required=False - ) - if ReCaptchaField is not None: captcha = ReCaptchaField(widget=ReCaptchaWidget()) @@ -124,9 +118,6 @@ class RegistrationView(OldRegistrationView): profile.language = cleaned_data["language"] profile.organizations.add(*cleaned_data["organizations"]) profile.save() - - #if newsletter_id is not None and cleaned_data["newsletter"]: - # Subscription(user=user, newsletter_id=newsletter_id, subscribed=True).save() return user def get_initial(self, *args, **kwargs): diff --git a/judge/views/user.py b/judge/views/user.py index 7cb98ec..769b8f2 100644 --- a/judge/views/user.py +++ b/judge/views/user.py @@ -35,14 +35,13 @@ from django.views.generic import DetailView, ListView, TemplateView from django.template.loader import render_to_string from reversion import revisions -from judge.forms import UserForm, ProfileForm, newsletter_id +from judge.forms import UserForm, ProfileForm from judge.models import Profile, Rating, Submission, Friend from judge.performance_points import get_pp_breakdown from judge.ratings import rating_class, rating_progress from judge.tasks import import_users from judge.utils.problems import contest_completed_ids, user_completed_ids from judge.utils.ranker import ranker -from judge.utils.subscription import Subscription from judge.utils.unicode import utf8text from judge.utils.views import ( DiggPaginatorMixin, @@ -416,26 +415,6 @@ def edit_profile(request): revisions.set_user(request.user) revisions.set_comment(_("Updated on site")) - if newsletter_id is not None: - try: - subscription = Subscription.objects.get( - user=request.user, newsletter_id=newsletter_id - ) - except Subscription.DoesNotExist: - if form.cleaned_data["newsletter"]: - Subscription( - user=request.user, - newsletter_id=newsletter_id, - subscribed=True, - ).save() - else: - if subscription.subscribed != form.cleaned_data["newsletter"]: - subscription.update( - ("unsubscribe", "subscribe")[ - form.cleaned_data["newsletter"] - ] - ) - perm = Permission.objects.get( codename="test_site", content_type=ContentType.objects.get_for_model(Profile), @@ -449,15 +428,6 @@ def edit_profile(request): else: form_user = UserForm(instance=request.user) form = ProfileForm(instance=profile, user=request.user) - if newsletter_id is not None: - try: - subscription = Subscription.objects.get( - user=request.user, newsletter_id=newsletter_id - ) - except Subscription.DoesNotExist: - form.fields["newsletter"].initial = False - else: - form.fields["newsletter"].initial = subscription.subscribed form.fields["test_site"].initial = request.user.has_perm("judge.test_site") tzmap = settings.TIMEZONE_MAP diff --git a/requirements.txt b/requirements.txt index 2852a22..5000705 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,7 +30,6 @@ packaging celery ansi2html @ git+https://github.com/DMOJ/ansi2html.git sqlparse -django-newsletter netaddr redis lupa diff --git a/templates/newsletter/common.html b/templates/newsletter/common.html deleted file mode 100644 index 8b97e39..0000000 --- a/templates/newsletter/common.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {% block title %}{{ _('Newsletter') }}{% endblock title %} - - {% block header %} - {% endblock header %} - - - - {% block body %} - {% endblock body %} - - diff --git a/templates/newsletter/message/message.html b/templates/newsletter/message/message.html deleted file mode 100644 index c23708f..0000000 --- a/templates/newsletter/message/message.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - {{ newsletter.title }}: {{ message.title }} - - - {% for article in message.articles.all() %} -
{{ article.text|safe }}
- - {% if article.url %} -
Read more
- {% endif %} - {% endfor %} - - Unsubscribe - {% if submission and submission.publish %} - Read message online - {% endif %} - - diff --git a/templates/newsletter/message/message.txt b/templates/newsletter/message/message.txt deleted file mode 100644 index d348e53..0000000 --- a/templates/newsletter/message/message.txt +++ /dev/null @@ -1,15 +0,0 @@ -++++++++++++++++++++ - -{{ newsletter.title|safe }}: {{ message.title|safe }} - -++++++++++++++++++++ - -{% for article in message.articles.all() %} -{{ article.title|safe }} -{{ article.text|striptags|safe }} - -{% endfor %} - -++++++++++++++++++++ - -Unsubscribe: http://{{ site }}{{ url('newsletter_unsubscribe_request', newsletter.slug) }} \ No newline at end of file diff --git a/templates/newsletter/message/message_subject.txt b/templates/newsletter/message/message_subject.txt deleted file mode 100644 index b770ecb..0000000 --- a/templates/newsletter/message/message_subject.txt +++ /dev/null @@ -1 +0,0 @@ -{{ message.title|safe }} \ No newline at end of file diff --git a/templates/newsletter/message/subscribe.html b/templates/newsletter/message/subscribe.html deleted file mode 100644 index 11a8c36..0000000 --- a/templates/newsletter/message/subscribe.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - Subscription to {{ newsletter.title }} - - -Dear {{ subscription.name }}, - -you, or someone in your name requested a subscription to {{ newsletter.title }}. - -If you would like to confirm your subscription, please follow this activation link: -http://{{ site.domain }}{{ subscription.subscribe_activate_url }} - -Kind regards, -{{ newsletter.sender }} - - diff --git a/templates/newsletter/message/subscribe.txt b/templates/newsletter/message/subscribe.txt deleted file mode 100644 index a2bd3c8..0000000 --- a/templates/newsletter/message/subscribe.txt +++ /dev/null @@ -1,9 +0,0 @@ -Dear {{ subscription.name|safe }}, - -you, or someone in your name requested a subscription to {{ newsletter.title|safe }}. - -If you would like to confirm your subscription, please follow this activation link: -http://{{ site.domain }}{{ subscription.subscribe_activate_url }} - -Kind regards, -{{ newsletter.sender|safe }} \ No newline at end of file diff --git a/templates/newsletter/message/subscribe_subject.txt b/templates/newsletter/message/subscribe_subject.txt deleted file mode 100644 index 05dd618..0000000 --- a/templates/newsletter/message/subscribe_subject.txt +++ /dev/null @@ -1 +0,0 @@ -{{ newsletter.title|safe }} - Confirm subscription \ No newline at end of file diff --git a/templates/newsletter/message/unsubscribe.html b/templates/newsletter/message/unsubscribe.html deleted file mode 100644 index 8780eca..0000000 --- a/templates/newsletter/message/unsubscribe.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - Unsubscription from {{ newsletter.title }} - - -Dear {{ subscription.name }}, - -you, or someone in your name requested unsubscription from {{ newsletter.title }}. - -If you would like to confirm your unsubscription, please follow this activation link: -http://{{ site.domain }}{{ subscription.unsubscribe_activate_url }} - -Kind regards, -{{ newsletter.sender }} - - diff --git a/templates/newsletter/message/unsubscribe.txt b/templates/newsletter/message/unsubscribe.txt deleted file mode 100644 index 9ca0d34..0000000 --- a/templates/newsletter/message/unsubscribe.txt +++ /dev/null @@ -1,9 +0,0 @@ -Dear {{ subscription.name|safe }}, - -you, or someone in your name requested unsubscription from {{ newsletter.title|safe }}. - -If you would like to confirm your unsubscription, please follow this activation link: -http://{{ site.domain }}{{ subscription.unsubscribe_activate_url }} - -Kind regards, -{{ newsletter.sender|safe }} diff --git a/templates/newsletter/message/unsubscribe_subject.txt b/templates/newsletter/message/unsubscribe_subject.txt deleted file mode 100644 index 5b824c2..0000000 --- a/templates/newsletter/message/unsubscribe_subject.txt +++ /dev/null @@ -1 +0,0 @@ -{{ newsletter.title|safe }} - Confirm unsubscription \ No newline at end of file diff --git a/templates/newsletter/message/update.html b/templates/newsletter/message/update.html deleted file mode 100644 index a0838c4..0000000 --- a/templates/newsletter/message/update.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - Update of subscription to {{ newsletter.title }} - - -Dear {{ subscription.name }}, - -you, or someone in your name requested updating your personal information for {{ newsletter.title }}. - -To make changes to your information in our database, please follow this activation link: -http://{{ site.domain }}{{ subscription.update_activate_url }} - -Kind regards, -{{ newsletter.sender }} - - diff --git a/templates/newsletter/message/update.txt b/templates/newsletter/message/update.txt deleted file mode 100644 index d46d828..0000000 --- a/templates/newsletter/message/update.txt +++ /dev/null @@ -1,9 +0,0 @@ -Dear {{ subscription.name|safe }}, - -you, or someone in your name requested updating your personal information for {{ newsletter.title|safe }}. - -To make changes to your information in our database, please follow this activation link: -http://{{ site.domain }}{{ subscription.update_activate_url }} - -Kind regards, -{{ newsletter.sender|safe }} \ No newline at end of file diff --git a/templates/newsletter/message/update_subject.txt b/templates/newsletter/message/update_subject.txt deleted file mode 100644 index 9002b7e..0000000 --- a/templates/newsletter/message/update_subject.txt +++ /dev/null @@ -1 +0,0 @@ -{{ newsletter.title|safe }} - Update information \ No newline at end of file diff --git a/templates/newsletter/newsletter_detail.html b/templates/newsletter/newsletter_detail.html deleted file mode 100644 index 4b84ec3..0000000 --- a/templates/newsletter/newsletter_detail.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ object.title }} - Newsletter - {{ SITE_LONG_NAME }}{% endblock %} -{% block content_title %}Newsletter: {{ object.title }}{% endblock %} - -{% block body %} - -{% endblock %} \ No newline at end of file diff --git a/templates/newsletter/newsletter_list.html b/templates/newsletter/newsletter_list.html deleted file mode 100644 index a528077..0000000 --- a/templates/newsletter/newsletter_list.html +++ /dev/null @@ -1,46 +0,0 @@ -{% extends "base.html" %} -{% block title %} {{ _('Newsletter list') }} - {{ SITE_LONG_NAME }}{% endblock %} -{% block content_title %} {{ _('Newsletter list') }} {% endblock %} - -{% block body %} -

{{ _('Subscribe to get the latest emails about upcoming contests and events.')}}

-
-
- {% if request.user.is_authenticated %} -
- {% csrf_token %} - {{ formset.management_form }} - - - - - - {% for form in formset.forms %} - - - - {% endfor %} -
{{ _('Newsletter') }}{{ _('Subscribe') }}
{{ form.id }} - - {{ form.instance.newsletter.title }} - {{ form.subscribed }} -
-
-

- -

-
- {% else %} - - - - - {% for newsletter in object_list %} - - - - {% endfor %} -
Newsletter
{{ newsletter.title }}
- {% endif %} -
-{% endblock %} \ No newline at end of file diff --git a/templates/newsletter/submission_archive.html b/templates/newsletter/submission_archive.html deleted file mode 100644 index 4dd2689..0000000 --- a/templates/newsletter/submission_archive.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "base.html" %} -{% block title %}{{ newsletter }} - Newsletter Archive - {{ SITE_LONG_NAME }}{% endblock %} -{% block content_title %}Newsletter Archive: {{ newsletter }}{% endblock %} - -{% block body %} - -
-

Back to list

-{% endblock %} \ No newline at end of file diff --git a/templates/newsletter/subscription_activate.html b/templates/newsletter/subscription_activate.html deleted file mode 100644 index 40d9cac..0000000 --- a/templates/newsletter/subscription_activate.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Newsletter {{ newsletter.title }} {{ action }} activate{% endblock %} - -{% block body %} -

Newsletter {{ newsletter.title }} {{ action }} activate

-
- {% csrf_token %} - {{ form.as_p() }} -

-
-{% endblock %} \ No newline at end of file diff --git a/templates/newsletter/subscription_subscribe.html b/templates/newsletter/subscription_subscribe.html deleted file mode 100644 index 97c22b2..0000000 --- a/templates/newsletter/subscription_subscribe.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Newsletter subscribe{% endblock %} - -{% block body %} -

Newsletter subscribe {{ newsletter.title }}

- {% if error %} -

- Due to a technical error we were not able to submit your confirmation email. - This could be because your email address is invalid. -

- {% else %} -
- {% csrf_token %} - {{ form.as_p() }} -

-
- {% endif %} -{% endblock %} \ No newline at end of file diff --git a/templates/newsletter/subscription_subscribe_activated.html b/templates/newsletter/subscription_subscribe_activated.html deleted file mode 100644 index 4b9f50b..0000000 --- a/templates/newsletter/subscription_subscribe_activated.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Newsletter {{ newsletter.title }} {{ action }} activate{% endblock %} -{% block body %} -

Newsletter {{ newsletter.title }} {{ action }} activate

-

Your subscription has successfully been activated.

-{% endblock %} \ No newline at end of file diff --git a/templates/newsletter/subscription_subscribe_email_sent.html b/templates/newsletter/subscription_subscribe_email_sent.html deleted file mode 100644 index 84e5ca5..0000000 --- a/templates/newsletter/subscription_subscribe_email_sent.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base.html" %} -{% block title %}Newsletter subscribe{% endblock %} - -{% block body %} -

Newsletter subscribe {{ newsletter.title }}

-

Your subscription request was successfully received and an activation email has been sent to you. In that email - you will find a link which you need to follow in order to activate your subscription.

-{% endblock %} \ No newline at end of file diff --git a/templates/newsletter/subscription_subscribe_user.html b/templates/newsletter/subscription_subscribe_user.html deleted file mode 100644 index 5f13a79..0000000 --- a/templates/newsletter/subscription_subscribe_user.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Newsletter subscribe{% endblock %} - -{% block body %} -

Newsletter subscribe {{ newsletter.title }}

-

Welcome, {{ request.user }}!

- {% if messages %} - - {% else %} - Do you want to subscribe to this newsletter? -
- {% csrf_token %} -

-
- {% endif %} -{% endblock %} \ No newline at end of file diff --git a/templates/newsletter/subscription_unsubscribe.html b/templates/newsletter/subscription_unsubscribe.html deleted file mode 100644 index 3647d27..0000000 --- a/templates/newsletter/subscription_unsubscribe.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Newsletter unsubscribe{% endblock %} - -{% block body %} -

Newsletter unsubscribe {{ newsletter.title }}

- {% if error %} -

Due to a technical error we were not able to submit your confirmation email. - This could be because your email address is invalid.

- {% else %} -
- {% csrf_token %} - {{ form.as_p() }} -

-
- {% endif %} -{% endblock %} \ No newline at end of file diff --git a/templates/newsletter/subscription_unsubscribe_activated.html b/templates/newsletter/subscription_unsubscribe_activated.html deleted file mode 100644 index baafefd..0000000 --- a/templates/newsletter/subscription_unsubscribe_activated.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "newsletter/common.html" %} - -{% block title %}{{ _('Newsletter') }} {{ newsletter.title }} {{ action }} {{ _('activate') }}{% endblock title %} - -{% block body %} -

{{ _('Newsletter') }} {{ newsletter.title }} {{ action }} {{ _('activate') }}

- -

{{ _('You have successfully been unsubscribed.') }}

-{% endblock body %} diff --git a/templates/newsletter/subscription_unsubscribe_email_sent.html b/templates/newsletter/subscription_unsubscribe_email_sent.html deleted file mode 100644 index 4a1d4c8..0000000 --- a/templates/newsletter/subscription_unsubscribe_email_sent.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "newsletter/common.html" %} - -{% block title %}{{ _('Newsletter unsubscribe') }}{% endblock title %} - -{% block body %} -

{{ _('Newsletter unsubscribe') }} {{ newsletter.title }}

- -

{{ _('Your unsubscription request has successfully been received. An email has been sent to you with a link you need to follow in order to confirm your unsubscription.') }}

-{% endblock body %} diff --git a/templates/newsletter/subscription_unsubscribe_user.html b/templates/newsletter/subscription_unsubscribe_user.html deleted file mode 100644 index ee905b7..0000000 --- a/templates/newsletter/subscription_unsubscribe_user.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "newsletter/common.html" %} - -{% block title %}{{ _('Newsletter unsubscribe') }}{% endblock title %} - -{% block body %} -

{{ _('Newsletter unsubscribe') }} {{ newsletter.title }}

- -

Welcome, {{ request.user }}!

- - {% if messages %} - - {% else %} - {{ _('Do you want to unsubscribe from this newsletter?') }} -
- {% csrf_token %} -

-
- {% endif %} - -{% endblock body %} diff --git a/templates/newsletter/subscription_update.html b/templates/newsletter/subscription_update.html deleted file mode 100644 index 8150646..0000000 --- a/templates/newsletter/subscription_update.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "newsletter/common.html" %} - -{% block title %}{{ _('Newsletter update') }}{% endblock title %} - -{% block body %} -

{{ _('Newsletter update') }} {{ newsletter.title }}

- - {% if error %} -

{{ _('Due to a technical error we were not able to submit your confirmation email. This could be because your email address is invalid.') }}

- {% else %} -
- {% csrf_token %} - {{ form.as_p() }} -

-
- {% endif %} -{% endblock body %} diff --git a/templates/newsletter/subscription_update_activated.html b/templates/newsletter/subscription_update_activated.html deleted file mode 100644 index 5707711..0000000 --- a/templates/newsletter/subscription_update_activated.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "newsletter/common.html" %} - -{% block title %}{{ _('Newsletter') }} {{ newsletter.title }} {{ action }} {{ _('activate') }}{% endblock title %} - -{% block body %} -

{{ _('Newsletter') }} {{ newsletter.title }} {{ action }} {{ _('activate') }}

- -

{{ _('Your subscription has successfully been updated.') }}

-{% endblock body %} diff --git a/templates/newsletter/subscription_update_email_sent.html b/templates/newsletter/subscription_update_email_sent.html deleted file mode 100644 index ea03d6b..0000000 --- a/templates/newsletter/subscription_update_email_sent.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "newsletter/common.html" %} - -{% block title %}{{ _('Newsletter update') }}{% endblock title %} - -{% block body %} -

{{ _('Newsletter update') }} {{ newsletter.title }}

- -

{{ _('Your update request was successfully received and an activation email has been sent to you. In that email you will find a link which you need to follow in order to update your subscription.') }}

-{% endblock body %} diff --git a/templates/user/edit-profile.html b/templates/user/edit-profile.html index a8039bd..96fe35e 100644 --- a/templates/user/edit-profile.html +++ b/templates/user/edit-profile.html @@ -127,16 +127,6 @@ {{ form.math_engine }} {% endif %} - {% if form.newsletter %} - - - {{ form.newsletter }} - - - - {% endif %} {{ form.test_site }}