2

I am using Aldryn Newsblog and Aldryn FAQ in my DjangoCMS project. When trying to add a new page that is not a blog page, but just a normal CMS page, I get the following error: problem adding new page to Django CMS

Seems like Aldryn Newsblog rewrites the urls and sets itself as the default root.

Here's my urls.py file:

from __future__ import absolute_import, print_function, unicode_literals

from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import *  # NOQA
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

admin.autodiscover()

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),  # NOQA
    url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
        {'sitemaps': {'cmspages': CMSSitemap}}),
    url(r'^select2/', include('django_select2.urls')),
    url(r'^', include('cms.urls')),
)

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns = patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve',  # NOQA
            {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
        ) + staticfiles_urlpatterns() + urlpatterns  # NOQA

How to I tweak it to account for Aldryn Newsblog?

dmk12
  • 409
  • 3
  • 16

2 Answers2

2

I solved this by going to my Blog page -> Advanced Settings -> Application -> deselect "NewsBlog", select "------" (none).

I was then able to create a new page "Home", turned Application -> NewsBlog back on for my blog page and all works fine.

maheshwaghmare
  • 2,082
  • 19
  • 23
dmk12
  • 409
  • 3
  • 16
0

I can't comment yet, and I know this isn't proper protocol for an answer, but I simply can't avoid thanking dmk12 for this solution. After two days of searching/going insane, this was the only mention of this technique, and it's the only thing that fixed my home page loading errors. It definitely deserves more attention, because it must be happening to more than just us three Aldryn users.

P.S. I have no idea how you figured that out, but I'm really glad you did.

sparkholiday
  • 82
  • 10