openmumbai/openmumbai/urls.py

30 lines
1.1 KiB
Python
Raw Normal View History

2012-06-09 18:15:50 +00:00
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 17:56:46 +00:00
import settings
from os.path import join
2012-06-09 18:15:50 +00:00
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 17:56:46 +00:00
url(r'^$', 'places.views.index', name='index'),
2012-08-14 05:40:46 +00:00
url(r'^geojson/(?P<ctype_id>[0-9]+)$', 'base.views.geojson', name='geojson'),
2012-08-14 14:07:26 +00:00
url(r'^edit/(?P<ctype_id>[0-9]*)$', 'places.views.edit', name='edit'),
2012-06-09 18:15:50 +00:00
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
)
2012-06-13 17:56:46 +00:00
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")}),
)