Created
August 18, 2009 14:37
-
-
Save byroncorrales/169747 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls.defaults import * | |
from os import path as os_path | |
from django.conf import settings | |
from mapa.models import Mapa | |
from mapa.views import lista_mapa | |
# Uncomment the next two lines to enable the admin: | |
from django.contrib import admin | |
admin.autodiscover() | |
urlpatterns = patterns('mapa.views', | |
# Example: | |
# (r'^mapamagfor/', include('mapamagfor.foo.urls')), | |
# Uncomment the admin/doc line below and add 'django.contrib.admindocs' | |
# to INSTALLED_APPS to enable admin documentation: | |
# (r'^admin/doc/', include('django.contrib.admindocs.urls')), | |
# Uncomment the next line to enable the admin: | |
# (r'^admin/', include(admin.site.urls)), | |
(r'^mapa/lista/tipo/(?P<t>[^/]+)', 'lista_mapa'), | |
(r'^mapa/lista/region/(?P<r>[^/]+)', 'lista_mapa_region'), | |
(r'^mapa/$', 'index_mapa'), | |
(r'^admin/(.*)', admin.site.root), | |
) | |
if settings.DEBUG: | |
urlpatterns += patterns('', | |
#(r'^media/(.*)$', 'django.views.static.serve', | |
# {'document_root': os_path.join(settings.MEDIA_ROOT + '')}), | |
# (r'^attachment/(.*)$', 'django.views.static.serve', | |
# {'document_root': os_path.join(settings.MEDIA_ROOT + '/attachment')}), | |
(r'^attachment/(.*)$', 'django.views.static.serve', | |
{'document_root': settings.MEDIA_ROOT + '/attachment'}), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment