summaryrefslogtreecommitdiff
path: root/frontend/urls.py
blob: 15554d256c661ae44b4e0001830b395c201b171c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from django.conf.urls.defaults import *
from django.conf import settings

RE_PREFIX = '^' + settings.URL_PREFIX

handler500 = 'frontend.afe.views.handler500'

pattern_list = (
    (RE_PREFIX + r'admin/', include('django.contrib.admin.urls')),
    (RE_PREFIX, include('frontend.afe.urls')),
)

debug_pattern_list = (
    # redirect /tko and /results to local apache server
    (r'^(?P<path>(tko|results)/.*)$',
     'frontend.afe.views.redirect_with_extra_data',
     {'url': 'http://%(server_name)s/%(path)s?%(getdata)s'}),
)

if settings.DEBUG:
  pattern_list += debug_pattern_list

urlpatterns = patterns('', *pattern_list)