diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-03-06 14:13:36 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-03-06 14:13:36 +0000 |
commit | 3ee286527f1ec23ead2c11201b9fa504a5bf6208 (patch) | |
tree | 8a9f605f751126c884139a6b3baa2835684ed22b /urls.py | |
parent | 2c2614c48957c32334aa9ba317db935a979cd67f (diff) | |
parent | fee4c20e9607ccc479c33b2476fa1ba709efe607 (diff) |
Merge branch 'master' of /srv/git/projects/parabolaweb
Conflicts:
.gitignore
Diffstat (limited to 'urls.py')
-rw-r--r-- | urls.py | 73 |
1 files changed, 26 insertions, 47 deletions
@@ -17,47 +17,24 @@ sitemaps = { } admin.autodiscover() - -urlpatterns = patterns('packages.views', - (r'^groups/$', 'groups'), - (r'^groups/(?P<arch>[A-z0-9]+)/$', 'groups'), - (r'^groups/(?P<arch>[A-z0-9]+)/(?P<name>[A-z0-9\-+.]+)/$', - 'group_details'), - - (r'^opensearch/packages/$', 'opensearch', {}, 'opensearch-packages'), -) - -urlpatterns += patterns('todolists.views', - (r'^todolists/$', 'public_list'), -) - -urlpatterns += patterns('mirrors.views', - (r'^mirrors/status/$', 'status', {}, 'mirror-status'), - (r'^mirrors/status/json/$', 'status_json', {}, 'mirror-status-json'), - - (r'^mirrors/$', 'mirrors', {}, 'mirrors-list'), - (r'^mirrors/(?P<name>[\.\-\w]+)/$', 'mirror_details'), - - (r'^mirrorlist/$', 'generate_mirrorlist', {}, 'mirrorlist'), - (r'^mirrorlist/all/$', 'find_mirrors', {'countries': ['all']}), - (r'^mirrorlist/all/ftp/$', 'find_mirrors', - {'countries': ['all'], 'protocols': ['ftp']}), - (r'^mirrorlist/all/http/$', 'find_mirrors', - {'countries': ['all'], 'protocols': ['http']}), -) - -# Feeds and sitemaps -urlpatterns += patterns('', - (r'^feeds/$', 'public.views.feeds', {}, 'feeds-list'), - (r'^feeds/news/$', NewsFeed()), - (r'^feeds/packages/$', PackageFeed()), - (r'^feeds/packages/(?P<arch>[A-z0-9]+)/$', +urlpatterns = [] + +# Feeds patterns, used later +feeds_patterns = patterns('', + (r'^$', 'public.views.feeds', {}, 'feeds-list'), + (r'^news/$', NewsFeed()), + (r'^packages/$', PackageFeed()), + (r'^packages/(?P<arch>[A-z0-9]+)/$', PackageFeed()), - (r'^feeds/packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$', + (r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$', PackageFeed()), - (r'^sitemap.xml$', 'django.contrib.sitemaps.views.index', +) + +# Sitemaps +urlpatterns += patterns('django.contrib.sitemaps.views', + (r'^sitemap.xml$', 'index', {'sitemaps': sitemaps}), - (r'^sitemap-(?P<section>.+)\.xml$', 'django.contrib.sitemaps.views.sitemap', + (r'^sitemap-(?P<section>.+)\.xml$', 'sitemap', {'sitemaps': sitemaps}), ) @@ -65,12 +42,8 @@ urlpatterns += patterns('', urlpatterns += patterns('django.contrib.auth.views', (r'^login/$', 'login', { 'template_name': 'registration/login.html'}), - (r'^accounts/login/$', 'login', { - 'template_name': 'registration/login.html'}), (r'^logout/$', 'logout', { 'template_name': 'registration/logout.html'}), - (r'^accounts/logout/$', 'logout', { - 'template_name': 'registration/logout.html'}), ) # Public pages @@ -79,21 +52,27 @@ urlpatterns += patterns('public.views', (r'^about/$', direct_to_template, {'template': 'public/about.html'}, 'page-about'), (r'^art/$', direct_to_template, {'template': 'public/art.html'}, 'page-art'), (r'^svn/$', direct_to_template, {'template': 'public/svn.html'}, 'page-svn'), - (r'^hackers/$', 'userlist', { 'type':'Hackers' }, 'page-devs'), - (r'^fellows/$', 'userlist', { 'type':'Fellows' }, 'page-fellows'), + (r'^hackers/$', 'userlist', { 'type':'hackers' }, 'page-devs'), + (r'^fellows/$', 'userlist', { 'type':'fellows' }, 'page-fellows'), (r'^donate/$', 'donate', {}, 'page-donate'), (r'^download/$', 'download', {}, 'page-download'), ) # Includes and other remaining stuff urlpatterns += patterns('', - (r'^admin/', include(admin.site.urls)), - (r'^jsi18n/$', 'django.views.i18n.null_javascript_catalog'), - + (r'^jsi18n/$', 'django.views.i18n.null_javascript_catalog'), + (r'^admin/', include(admin.site.urls)), (r'^devel/', include('devel.urls')), + (r'^feeds/', include(feeds_patterns)), + (r'^groups/', include('packages.urls_groups')), + (r'^mirrorlist/',include('mirrors.urls_mirrorlist')), + (r'^mirrors/', include('mirrors.urls')), (r'^news/', include('news.urls')), (r'^packages/', include('packages.urls')), (r'^todo/', include('todolists.urls')), + (r'^opensearch/packages/$', 'packages.views.opensearch', + {}, 'opensearch-packages'), + (r'^todolists/$','todolists.views.public_list'), ) if settings.DEBUG == True: |