1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-27 16:04:24 +00:00

21 lines
536 B
Python
Raw Normal View History

from django.conf import settings
from django.conf.urls.defaults import *
from scrapyorg.docs.views import document
from scrapyorg.docs.views import images
urlpatterns = patterns('',
url(r'^$', document, {'url': ''}),
url(r'^(?P<url>[\w./-]*)/$', document),
url(r'^_images/(?P<path>.*)$', images),
)
if settings.DEBUG: # devel
urlpatterns += patterns('',
(r'^%s/(?P<path>.*)$' % settings.MEDIA_URL[1:],
'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)