diff --git a/pgweb/lists/forms.py b/pgweb/lists/forms.py index 94f41fd6..0afb9065 100644 --- a/pgweb/lists/forms.py +++ b/pgweb/lists/forms.py @@ -1,10 +1,2 @@ from django import forms -from models import MailingList - -class SubscribeForm(forms.Form): - jquery = True - - email = forms.EmailField(max_length=100,required=True,label="Email address") - action = forms.ChoiceField(required=True, choices=(('subscribe','Subscribe'),('unsubscribe','Unsubscribe'))) - lists = forms.ModelChoiceField(required=True, queryset=MailingList.objects.filter(active=True), label="Mailinglist") diff --git a/pgweb/lists/struct.py b/pgweb/lists/struct.py index ca41b163..e42eb5df 100644 --- a/pgweb/lists/struct.py +++ b/pgweb/lists/struct.py @@ -1,3 +1,2 @@ def get_struct(): yield ('community/lists/', None) - yield ('community/lists/subscribe/', None) diff --git a/pgweb/lists/views.py b/pgweb/lists/views.py index d823ee4d..1125b94d 100644 --- a/pgweb/lists/views.py +++ b/pgweb/lists/views.py @@ -5,50 +5,7 @@ from django.conf import settings import json -from pgweb.util.contexts import NavContext -from pgweb.mailqueue.util import send_simple_mail - from models import MailingList, MailingListGroup -from forms import SubscribeForm - -@csrf_exempt -def subscribe(request): - if request.POST: - form = SubscribeForm(request.POST) - if form.is_valid(): - if form.cleaned_data['action'] == 'subscribe': - mailsubject = "subscribe" - # We currently only support get mail, no digest. - # So send a regular subscribe request. - mailtxt = "subscribe %s\n" % form.cleaned_data['lists'] - else: - mailtxt = "unsubscribe %s\n" % form.cleaned_data['lists'] - mailsubject = "unsubscribe" - - send_simple_mail(form.cleaned_data['email'], - settings.LISTSERVER_EMAIL, - mailsubject, - mailtxt) - - return render_to_response('lists/subscribed.html', { - }, NavContext(request, "community")) - else: - # GET, so render up the form - form = SubscribeForm() - - return render_to_response('lists/subscribe_form.html', { - 'form': form, - 'operation': 'Legacy subscription', - 'jquery': True, - 'form_intro': """ -Note 1: Please ensure you read the Archive Policy -before posting to the lists.
- -Note 2: Please do not subscribe to mailing lists using e-mail -accounts protected by mail-back anti-spam systems. These are extremely annoying -to the list maintainers and other members, and you may be automatically unsubscribed.""" - }, NavContext(request, "community")) def listinfo(request): resp = HttpResponse(content_type='application/json') diff --git a/pgweb/settings.py b/pgweb/settings.py index 2fd6a106..c79ca50f 100644 --- a/pgweb/settings.py +++ b/pgweb/settings.py @@ -146,7 +146,6 @@ STATIC_CHECKOUT="/usr/local/pgweb-static" # Location of a checked o NOTIFICATION_EMAIL="someone@example.com" # Address to send notifications *to* NOTIFICATION_FROM="someone@example.com" # Address to send notifications *from* NOREPLY_FROM="someone@example.com" # Address to send unverified messages from -LISTSERVER_EMAIL="someone@example.com" # Address to majordomo BUGREPORT_EMAIL="someone@example.com" # Address to pgsql-bugs list BUGREPORT_NOREPLY_EMAIL="someone-noreply@example.com" # Address to no-reply pgsql-bugs address DOCSREPORT_EMAIL="someone@example.com" # Address to pgsql-docs list diff --git a/pgweb/urls.py b/pgweb/urls.py index 1dba7ccf..9380b31a 100644 --- a/pgweb/urls.py +++ b/pgweb/urls.py @@ -49,7 +49,8 @@ urlpatterns = patterns('', (r'^community/$', 'pgweb.core.views.community'), (r'^community/contributors/$', 'pgweb.contributors.views.completelist'), (r'^community/lists/$', RedirectView.as_view(url='/list/', permanent=True)), - (r'^community/lists/subscribe/$', 'pgweb.lists.views.subscribe'), + (r'^community/lists/subscribe/$', RedirectView.as_view(url='https://lists.postgresql.org/', permanent=True)), + (r'^community/lists/listinfo/$', 'pgweb.lists.views.listinfo'), (r'^community/lists/activate/$', 'pgweb.lists.views.activate'), (r'^community/survey/vote/(\d+)/$', 'pgweb.survey.views.vote'), diff --git a/templates/lists/subscribe_form.html b/templates/lists/subscribe_form.html deleted file mode 100644 index 2f99d559..00000000 --- a/templates/lists/subscribe_form.html +++ /dev/null @@ -1,28 +0,0 @@ -{%extends "base/form.html"%} -{% block extrahead %} -{{ block.super }} - -{%endblock%} -{%block pre_form_header%} -
-The PostgreSQL project is currently migrating all mailinglists from an -old legacy system to a new more modern system. As this migration goes -on, there will unfortunately be two different sets of subscribe and -unsubscribe methods. -
--To subscribe to one of the lists that have been migrated, please use -the new system. -
--If the list you want to subscribe to is listed below, it has not yet -been migrated. For these lists, please use the form below. Use the -same form to unsubscribe from one of these lists. -
-{%endblock%}