Replace /community/lists/ page with a redirect to /list/
authorMagnus Hagander <magnus@hagander.net>
Sat, 14 Sep 2013 12:11:12 +0000 (14:11 +0200)
committerMagnus Hagander <magnus@hagander.net>
Sat, 14 Sep 2013 12:13:20 +0000 (14:13 +0200)
This new page is served from the archives backend, and has been enhanced
to contain the combination of the contents of both pages.

pgweb/lists/views.py
pgweb/urls.py
pgweb/util/contexts.py
templates/lists/root.html [deleted file]

index 256bf55dfe5aa40d85c983c16466bb0165b21293..f766ac118f5ad1bac4b528e1d3fffda4d2df3f7d 100644 (file)
@@ -14,13 +14,6 @@ from pgweb.util.misc import sendmail
 from models import MailingList, MailingListGroup
 from forms import SubscribeForm
 
-def root(request):
-       lists = MailingList.objects.all().order_by('group__sortkey', 'listname')
-       
-       return render_to_response('lists/root.html', {
-               'lists': lists,
-       }, NavContext(request, 'community'))
-
 @csrf_exempt
 def subscribe(request):
        if request.POST:
index f90b61696c8ddf6c42394794237c758d947192a6..4ac61c2138693dd2516bbd5a354225b7e6effe5a 100644 (file)
@@ -48,7 +48,7 @@ urlpatterns = patterns('',
 
     (r'^community/$', 'core.views.community'),
     (r'^community/contributors/$', 'contributors.views.completelist'),
-    (r'^community/lists/$', 'lists.views.root'),
+    (r'^community/lists/$', redirect_to, {'url': '/list/'}),
     (r'^community/lists/subscribe/$', 'lists.views.subscribe'),
     (r'^community/lists/listinfo/$', 'lists.views.listinfo'),
     (r'^community/survey/vote/(\d+)/$', 'survey.views.vote'),
index c091a4c5b4680efe92ff275a0a1d21eaf42b5cda..e7dbdd48a1e3bd7643428bf2ec1a6c51ea9564ad 100644 (file)
@@ -46,10 +46,7 @@ sitenav = {
        'community': [
                {'title': 'Community',          'link':'/community/'},
                {'title': 'Contributors',       'link':'/community/contributors/'},
-               {'title': 'Mailing Lists',      'link':'/community/lists/', 'submenu': [
-                       {'title': 'Subscribe',  'link':'/community/lists/subscribe/'},
-                       {'title': 'Archives',   'link':'/list/'},
-               ]},
+               {'title': 'Mailing Lists',      'link':'/list/'},
                {'title': 'IRC',                'link':'/community/irc/'},
                {'title': 'Local User Groups',  'link':'/community/user-groups/'},
                {'title': 'Featured Users',     'link':'/about/users/'},
diff --git a/templates/lists/root.html b/templates/lists/root.html
deleted file mode 100644 (file)
index aa06c46..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-{%extends "base/page.html"%}
-{%block title%}Mailing Lists{%endblock%}
-{%block contents%}
-
-<h1>Mailing Lists</h1>
-
-<p>The following is a list of PostgreSQL related mailing lists.</p>
-
-<h3>How to Subscribe or Unsubscribe</h3>
-
-<p>Fill out this <a href="/community/lists/subscribe">form</a>.</p>
-
-<!-- this text is duplicated in system/form/subscribe.php -->
-<p>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.
-</p>
-
-<h3>Archives</h3>
-
-<p>Before posting to a list, you may wish to search the <a href="/list/">archives</a>.</p>
-
-{% for l in lists %}
-{%ifchanged l.group %}
-{%if not forloop.first %}
- </table>
-</div>
-
-{%endif%}
-<h2>{{l.group.groupname}}</h2>
-<div class="tblBasic">
-<table border="0" cellpadding="0" cellspacing="0" class="tblBasicGrey">
-<tr>
-       <th class="colFirst">List</th>
-       <th class="colLast">Description</th>
-</tr>
-
-{%endifchanged%}
-<tr>
-    <td class="colFirst"><a href="/list/{{l.listname}}/">{{l.maybe_shortdesc}}</a></td>
-    <td class="colLast">{{l.description|safe}}</td>
-</tr>
-{%endfor%}
- </table>
-</div>
-
-{%endblock%}
-