blob: 2b2e8df8b5990135e25e1d9c5084066447eae19f [file] [log] [blame]
showarda5288b42009-07-28 20:06:08 +00001import os
showard35444862008-08-07 22:35:30 +00002from django.conf.urls.defaults import *
3from django.conf import settings
showarda5288b42009-07-28 20:06:08 +00004# The next two lines enable the admin and load each admin.py file:
5from django.contrib import admin
6admin.autodiscover()
showard35444862008-08-07 22:35:30 +00007
8RE_PREFIX = '^' + settings.URL_PREFIX
9
10pattern_list = (
showarda5288b42009-07-28 20:06:08 +000011 (RE_PREFIX + r'admin/(.*)', admin.site.root),
showard35444862008-08-07 22:35:30 +000012 (RE_PREFIX, include('new_tko.tko.urls')),
13)
14
showarde732ee72008-09-23 19:15:43 +000015if os.path.exists(os.path.join(os.path.dirname(__file__),
16 'tko', 'site_urls.py')):
17 pattern_list += ((RE_PREFIX, include('new_tko.tko.site_urls')),)
18
showard35444862008-08-07 22:35:30 +000019debug_pattern_list = (
20 # redirect /tko and /results to local apache server
21 (r'^(?P<path>(tko|results)/.*)$',
22 'frontend.afe.views.redirect_with_extra_data',
23 {'url': 'http://%(server_name)s/%(path)s?%(getdata)s'}),
24)
25
26if settings.DEBUG:
mbligh1ef218d2009-08-03 16:57:56 +000027 pattern_list += debug_pattern_list
showard35444862008-08-07 22:35:30 +000028
29urlpatterns = patterns('', *pattern_list)