annotate gpp/downloads/urls.py @ 145:71cb4208dc98
Tweak to #30, admin dashboard. Because of a bug in Django (9568), my dashboard appears on the login page. To get around this, pass in the user to the templatetag, so it can do a 'if user.is_staff' check. Also tweaked the HTML and CSS to show non-zero pending items in red. Shortened the pending item titles for readability.
author |
Brian Neal <bgneal@gmail.com> |
date |
Wed, 09 Dec 2009 00:03:10 +0000 |
parents |
a5f27f25fa52 |
children |
27bee3ac85e6 |
rev |
line source |
gremmie@1
|
1 """
|
gremmie@1
|
2 URLs for the downloads application.
|
gremmie@1
|
3 """
|
gremmie@1
|
4 from django.conf.urls.defaults import *
|
gremmie@1
|
5
|
gremmie@1
|
6 urlpatterns = patterns('downloads.views',
|
gremmie@1
|
7 url(r'^$', 'index', name='downloads-index'),
|
gremmie@1
|
8 url(r'^add/$', 'add', name='downloads-add'),
|
gremmie@1
|
9 url(r'^category/(?P<category>\d+)/(?P<sort>title|date|rating|hits)/page/(?P<page>\d+)/$',
|
gremmie@1
|
10 'category',
|
gremmie@1
|
11 name='downloads-category'),
|
bgneal@23
|
12 url(r'^details/(\d+)/$', 'details', name='downloads-details'),
|
gremmie@1
|
13 url(r'^(\d+)/$', 'download', name='downloads-download'),
|
gremmie@1
|
14 url(r'^new/$', 'new', name='downloads-new'),
|
gremmie@1
|
15 url(r'^popular/$', 'popular', name='downloads-popular'),
|
gremmie@1
|
16 url(r'^random/$', 'random_download', name='downloads-random'),
|
gremmie@1
|
17 url(r'^rate/$', 'rate_download', name='downloads-rate'),
|
gremmie@1
|
18 url(r'^rating/$', 'rating', name='downloads-rating'),
|
gremmie@1
|
19 url(r'^search/page/(?P<page>\d+)/$', 'search', name='downloads-search'),
|
gremmie@1
|
20 url(r'^thanks/$', 'thanks', name='downloads-add_thanks'),
|
gremmie@1
|
21 )
|