source: remit/urls.py @ c386673

client
Last change on this file since c386673 was f5bebab, checked in by Alex Dehnert <adehnert@…>, 11 years ago

Tweaks from doing a new install

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[719e4bb]1from django.conf.urls.defaults import *
[0f53aae]2from django.contrib.auth.views import login, logout
[719e4bb]3
[cafab4c]4import settings
5
[f468e6d]6# Necessary views
[7c3ea05]7import finance_core.views
[f468e6d]8
[719e4bb]9# Uncomment the next two lines to enable the admin:
[13a23ce]10from django.contrib import admin
11admin.autodiscover()
[719e4bb]12
13urlpatterns = patterns('',
14    # Example:
[3a0c51b]15    (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.html', 'extra_context': { 'pagename':'homepage' }, }, 'homepage'),
[7c3ea05]16    (r'^vouchers/', include('vouchers.urls')),
17    (r'^finance_core/', include('finance_core.urls')),
[719e4bb]18
19    # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
20    # to INSTALLED_APPS to enable admin documentation:
[13a23ce]21    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
[719e4bb]22
23    # Uncomment the next line to enable the admin:
[0671644]24    (r'^admin/', include(admin.site.urls)),
[0f53aae]25    url(r'^accounts/login/',  login,  name='login', ),
26    url(r'^accounts/logout/', logout, name='logout', ),
[719e4bb]27)
[cafab4c]28
29if settings.DEBUG:
[f5bebab]30    print "In debug mode; enabling static media serving"
[cafab4c]31    from django.views.static import serve
32    _media_url = settings.MEDIA_URL
33    if _media_url.startswith('/'):
34        _media_url = _media_url[1:]
35        urlpatterns += patterns('',
36                                (r'^%s(?P<path>.*)$' % _media_url,
37                                serve,
38                                {'document_root': settings.MEDIA_ROOT}))
39    del(_media_url, serve)
Note: See TracBrowser for help on using the repository browser.