urls.py 775 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
from bt import views as bt

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
stef's avatar
stef committed
10
    (r'^$', bt.index),
11
12
    (r'^accounts/logout$', 'django.contrib.auth.views.logout', {'next_page' : '/'}),
    (r'^accounts/', include('registration.urls')),
stef's avatar
stef committed
13
    url(r'^captcha/', include('captcha.urls')),
14
    (r'^ajax/(?P<country>[^/]*)(/(?P<operator>[^/]*))?$', bt.ajax),
stef's avatar
stef committed
15
    (r'^add/$', bt.add),
16
    (r'^view/(?P<id>[0-9]*)$', bt.view),
17
18
19
20
21
22
)

if settings.DEV_SERVER:
    urlpatterns += patterns('',
        (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_PATH}),
    )