openmumbai/openmumbai/urls.py

30 lines
1.1 KiB
Python
Raw Normal View History

2012-06-09 23:45:50 +05:30
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
2012-06-13 23:26:46 +05:30
import settings
from os.path import join
2012-06-09 23:45:50 +05:30
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'domains.views.home', name='home'),
# url(r'^domains/', include('domains.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
2012-06-13 23:26:46 +05:30
url(r'^$', 'places.views.index', name='index'),
2012-08-14 11:10:46 +05:30
url(r'^geojson/(?P<ctype_id>[0-9]+)$', 'base.views.geojson', name='geojson'),
2012-08-14 19:37:26 +05:30
url(r'^edit/(?P<ctype_id>[0-9]*)$', 'places.views.edit', name='edit'),
2012-06-09 23:45:50 +05:30
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
)
2012-06-13 23:26:46 +05:30
if settings.LOCAL_DEVELOPMENT:
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': join(settings.PROJECT_ROOT, "static")}),
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': join(settings.PROJECT_ROOT, "media")}),
)