-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
26 lines (21 loc) · 877 Bytes
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from django.conf.urls.defaults import *
from django.contrib import databrowse
from wmsb.models import WmsEndpoint, WmsLayer
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
databrowse.site.register(WmsEndpoint)
databrowse.site.register(WmsLayer)
urlpatterns = patterns('',
(r'^$', 'wmsb.views.layers'),
(r'^wmsb/', include('django_wms_browser.wmsb.urls')),
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
(r'^databrowse/(.*)', databrowse.site.root),
(r'^accounts/login/$', 'django.contrib.auth.views.login'),
(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT }),
)