From 88a93e36718f05a6dec2e3ad39c0be60cb225ac0 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 3 Oct 2012 10:47:48 +0200 Subject: [PATCH] Switch to new namespace, preparing for site integration --- .../archives/mailarchives/templates/base.html | 2 +- .../mailarchives/templates/datelist.html | 6 ++--- .../mailarchives/templates/index.html | 2 +- .../mailarchives/templates/message.html | 6 ++--- .../mailarchives/templates/message_flat.html | 4 +-- .../mailarchives/templates/monthlist.html | 2 +- django/archives/mailarchives/views.py | 2 +- django/archives/urls.py | 25 ++++++++----------- 8 files changed, 23 insertions(+), 26 deletions(-) diff --git a/django/archives/mailarchives/templates/base.html b/django/archives/mailarchives/templates/base.html index 84343d6..b68b994 100644 --- a/django/archives/mailarchives/templates/base.html +++ b/django/archives/mailarchives/templates/base.html @@ -94,7 +94,7 @@ {%if g.lists%} {%endif%} diff --git a/django/archives/mailarchives/templates/datelist.html b/django/archives/mailarchives/templates/datelist.html index 73135d3..cb7dca1 100644 --- a/django/archives/mailarchives/templates/datelist.html +++ b/django/archives/mailarchives/templates/datelist.html @@ -17,14 +17,14 @@ {%endif%} {%endfor%} {%with messages|first as firstmsg%} -Prev +Prev {%endwith%} | {%with messages|last as lastmsg%} -Next +Next {%endwith%} {%if daysinmonth%} - + {%endif%} {%endblock%} diff --git a/django/archives/mailarchives/templates/index.html b/django/archives/mailarchives/templates/index.html index 091fb2c..b6f0216 100644 --- a/django/archives/mailarchives/templates/index.html +++ b/django/archives/mailarchives/templates/index.html @@ -10,7 +10,7 @@
  • {{g.groupname}}
  • diff --git a/django/archives/mailarchives/templates/message.html b/django/archives/mailarchives/templates/message.html index 9b691dc..599d827 100644 --- a/django/archives/mailarchives/templates/message.html +++ b/django/archives/mailarchives/templates/message.html @@ -62,7 +62,7 @@ span.listname { Message-ID: - {{msg.messageid}} (view raw or flat) + {{msg.messageid}} (view raw or flat) Thread: @@ -75,7 +75,7 @@ span.listname { Lists: - {%for l in lists %}{{l.listname}}{%endfor%} + {%for l in lists %}{{l.listname}}{%endfor%}
    @@ -84,7 +84,7 @@ span.listname { {%if msg.has_attachment%} {%for a in msg.attachment_set.all%}
    -Attachment: {{a.filename}}
    +Attachment: {{a.filename}}
    Description: {{a.contenttype}}
    {%endfor%} diff --git a/django/archives/mailarchives/templates/message_flat.html b/django/archives/mailarchives/templates/message_flat.html index 65171ba..820d506 100644 --- a/django/archives/mailarchives/templates/message_flat.html +++ b/django/archives/mailarchives/templates/message_flat.html @@ -48,7 +48,7 @@ div.msgwrap { Message-ID: - {{m.messageid}} (view raw) + {{m.messageid}} (view raw)
    @@ -57,7 +57,7 @@ div.msgwrap { {%if m.has_attachment%} {%for a in m.attachment_set.all%}
    -Attachment: {{a.filename}}
    +Attachment: {{a.filename}}
    Description: {{a.contenttype}}
    {%endfor%} diff --git a/django/archives/mailarchives/templates/monthlist.html b/django/archives/mailarchives/templates/monthlist.html index 380acd1..304b56d 100644 --- a/django/archives/mailarchives/templates/monthlist.html +++ b/django/archives/mailarchives/templates/monthlist.html @@ -9,7 +9,7 @@
  • {{year.grouper}}
  • diff --git a/django/archives/mailarchives/views.py b/django/archives/mailarchives/views.py index fbe1492..d8c7c3e 100644 --- a/django/archives/mailarchives/views.py +++ b/django/archives/mailarchives/views.py @@ -32,7 +32,7 @@ def get_all_groups_and_lists(listid=None): 'groupname': l.group.groupname, 'sortkey': l.group.sortkey, 'lists': [l,], - 'homelink': l.listname, + 'homelink': 'list/%s' % l.listname, } return (sorted(groups.values(), key=lambda g: g['sortkey']), listgroupid) diff --git a/django/archives/urls.py b/django/archives/urls.py index 9841175..195d237 100644 --- a/django/archives/urls.py +++ b/django/archives/urls.py @@ -15,24 +15,21 @@ urlpatterns = patterns('', # Uncomment the next line to enable the admin: # url(r'^admin/', include(admin.site.urls)), - (r'^test/(\d+)/$', 'archives.mailarchives.views.testview'), - (r'^test/oldsite/([^/]+)/$', 'archives.mailarchives.views.oldsite'), - (r'^$', 'archives.mailarchives.views.index'), (r'^message-id/([^/]+)$', 'archives.mailarchives.views.message'), - (r'^flat/([^/]+)$', 'archives.mailarchives.views.message_flat'), - (r'^raw/([^/]+)$', 'archives.mailarchives.views.message_raw'), - (r'^search/', 'archives.mailarchives.views.search'), + (r'^message-id/flat/([^/]+)$', 'archives.mailarchives.views.message_flat'), + (r'^message-id/raw/([^/]+)$', 'archives.mailarchives.views.message_raw'), + (r'^archives-search/', 'archives.mailarchives.views.search'), # Date etc indexes - (r'^([\w-]+)/$', 'archives.mailarchives.views.monthlist'), - (r'^([\w-]+)/(\d+)-(\d+)/$', 'archives.mailarchives.views.datelist'), - (r'^([\w-]+)/since/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})', 'archives.mailarchives.views.datelistsincetime'), - (r'^([\w-]+)/since/([^/]+)/$', 'archives.mailarchives.views.datelistsince'), - (r'^([\w-]+)/before/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})', 'archives.mailarchives.views.datelistbeforetime'), - (r'^([\w-]+)/before/([^/]+)$', 'archives.mailarchives.views.datelistbefore'), - - (r'^attachment/(\d+)/.*$', 'archives.mailarchives.views.attachment'), + (r'^list/([\w-]+)/$', 'archives.mailarchives.views.monthlist'), + (r'^list/([\w-]+)/(\d+)-(\d+)/$', 'archives.mailarchives.views.datelist'), + (r'^list/([\w-]+)/since/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})', 'archives.mailarchives.views.datelistsincetime'), + (r'^list/([\w-]+)/since/([^/]+)/$', 'archives.mailarchives.views.datelistsince'), + (r'^list/([\w-]+)/before/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})', 'archives.mailarchives.views.datelistbeforetime'), + (r'^list/([\w-]+)/before/([^/]+)$', 'archives.mailarchives.views.datelistbefore'), + + (r'^message-id/attachment/(\d+)/.*$', 'archives.mailarchives.views.attachment'), # Normally served by the webserver, but needed for development installs (r'^media/(.*)$', 'django.views.static.serve', { -- 2.39.5