djangocms_blog/tests/test_utils/urls.py

28 lines
1 KiB
Python
Raw Normal View History

2014-06-08 22:06:01 +00:00
from cms.utils.conf import get_cms_setting
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf.urls.i18n import i18n_patterns
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()
urlpatterns = patterns('',
#(r'', include('django.contrib.staticfiles.urls')),
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
url(r'^media/cms/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': get_cms_setting('MEDIA_ROOT'), 'show_indexes': True}),
url(r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javascript_catalog'),
2014-09-04 07:17:03 +00:00
url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
2014-06-08 22:06:01 +00:00
)
urlpatterns += staticfiles_urlpatterns()
urlpatterns += i18n_patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^blog/', include('djangocms_blog.urls', namespace='djangocms_blog')),
url(r'^', include('cms.urls')),
)