source: asadb/urls.py @ dafa3c8

fysm-4-1iframespace-accessstablestagetest-hooks
Last change on this file since dafa3c8 was dafa3c8, checked in by Alex Dehnert <adehnert@…>, 15 years ago

Category support

  • Property mode set to 100644
File size: 1.4 KB
Line 
1from django.conf.urls.defaults import *
2from django.contrib.auth.views import login, logout
3from django.views.generic import list_detail
4
5# Uncomment the next two lines to enable the admin:
6from django.contrib import admin
7admin.autodiscover()
8
9import settings
10
11import forms.views
12
13urlpatterns = patterns('',
14    # Example:
15    # (r'^asadb/', include('asadb.foo.urls')),
16    url(
17        r'^$',
18        'django.views.generic.simple.direct_to_template',
19        {'template': 'index.html', 'extra_context': { 'pagename':'homepage' }, },
20        name='homepage',
21    ),
22
23    # FYSM
24    url(r'^fysm/((\d+)/)?(([\w-]+)/)?$', forms.views.fysm_by_years, name='fysm', ),
25
26    # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
27    # to INSTALLED_APPS to enable admin documentation:
28    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
29
30    # Uncomment the next line to enable the admin:
31    (r'^admin/', include(admin.site.urls)),
32    url(r'^accounts/login/',  login,  name='login', ),
33    url(r'^accounts/logout/', logout, name='logout', ),
34)
35
36if settings.DEBUG:
37    from django.views.static import serve
38    _media_url = settings.MEDIA_URL
39    if _media_url.startswith('/'):
40        _media_url = _media_url[1:]
41        urlpatterns += patterns('',
42                                (r'^%s(?P<path>.*)$' % _media_url,
43                                serve,
44                                {'document_root': settings.MEDIA_ROOT}))
45    del(_media_url, serve)
Note: See TracBrowser for help on using the repository browser.