Do not load blog urlconf in server mode

This commit is contained in:
Iacopo Spalletti 2015-10-18 09:59:19 +02:00
parent aa84f8b63a
commit 75eca9aad3
2 changed files with 19 additions and 1 deletions

10
djangocms_blog/apps.py Normal file
View file

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class PageMetaConfig(AppConfig):
name = 'djangocms_page_meta'
verbose_name = _('django CMS Page Meta')

View file

@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import sys
from cms.utils.conf import get_cms_setting
from django.conf import settings
from django.conf.urls import include, patterns, url
@ -22,9 +24,15 @@ urlpatterns = patterns(
urlpatterns += staticfiles_urlpatterns()
if 'server' not in sys.argv:
urlpatterns += i18n_patterns(
'',
url(r'^blog/', include(
'djangocms_blog.urls', namespace='djangocms_blog', app_name='djangocms_blog'
)),
)
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')),
)