2016-06-13 20:31:45 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import absolute_import, print_function, unicode_literals
|
|
|
|
|
|
|
|
from cms.utils.conf import get_cms_setting
|
|
|
|
from django.conf import settings
|
|
|
|
from django.conf.urls import include, url
|
|
|
|
from django.conf.urls.i18n import i18n_patterns
|
|
|
|
from django.contrib import admin
|
|
|
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
|
|
|
from django.views.i18n import javascript_catalog
|
|
|
|
from django.views.static import serve
|
|
|
|
|
|
|
|
admin.autodiscover()
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
url(r'^media/(?P<path>.*)$', serve,
|
|
|
|
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
|
|
|
|
url(r'^media/cms/(?P<path>.*)$', serve,
|
|
|
|
{'document_root': get_cms_setting('MEDIA_ROOT'), 'show_indexes': True}),
|
|
|
|
url(r'^jsi18n/(?P<packages>\S+?)/$', javascript_catalog),
|
|
|
|
]
|
|
|
|
|
2017-01-01 16:17:28 +00:00
|
|
|
try:
|
|
|
|
import taggit_autosuggest
|
|
|
|
urlpatterns.append(url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')))
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
|
2016-06-13 20:31:45 +00:00
|
|
|
urlpatterns += staticfiles_urlpatterns()
|
|
|
|
|
|
|
|
urlpatterns += i18n_patterns(
|
|
|
|
url(r'^admin/', include(admin.site.urls)),
|
|
|
|
url(r'^', include('cms.urls')),
|
|
|
|
)
|