mirror of https://github.com/interlegis/sigi.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
39 lines
1.0 KiB
from django.conf import settings
|
|
from django.conf.urls.defaults import *
|
|
from django.contrib import databrowse
|
|
from django.db.models import get_models
|
|
import sigi.admin.filterspecs
|
|
from sigi import sites
|
|
|
|
map(databrowse.site.register, get_models())
|
|
|
|
urlpatterns = patterns(
|
|
'',
|
|
|
|
# databrowse
|
|
(r'^databrowse/(.*)', databrowse.site.root),
|
|
|
|
# admin docs
|
|
(r'^doc/', include('django.contrib.admindocs.urls')),
|
|
|
|
# automatic interface based on admin
|
|
(r'^(.*)', sites.default.root),
|
|
)
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns = patterns(
|
|
'',
|
|
|
|
# static files
|
|
(r'^media/(?P<path>.*)$', 'django.views.static.serve',
|
|
{'document_root': settings.MEDIA_ROOT}),
|
|
|
|
(r'^404/$', 'django.views.generic.simple.direct_to_template',
|
|
{'template': 'admin/404.html'}),
|
|
|
|
(r'^500/$', 'django.views.generic.simple.direct_to_template',
|
|
{'template': 'admin/500.html'}),
|
|
|
|
(r'^503/$', 'django.views.generic.simple.direct_to_template',
|
|
{'template': '503.html'}),
|
|
) + urlpatterns
|
|
|