In my url.py I have:
urlpatterns += patterns('',
url(r'^tinymce/', include('tinymce.urls')),
url(r'^', include('cms.urls')),
url(r'^journal/', include('zinnia.urls')),
url(r'^comments/', include('django.contrib.comments.urls')),
)
and
urlpatterns += patterns('',
url(r'^(?P<slug>[-\w\d]+)/$', PremiumListingDetailView.as_view(), name='premium_listing'),
)
I would like to have urls for premium listing's slug at http://www.example.com/slug to show the DetailView. The page loads if I place the Premium Listing's urls before django-cms but the rest of the cms pages will not be shown, e.g. going to http://www.example.com/about will throw a 404. If I place it after the cms' include urls, going to http://www.example.com/slug will not work.
How should I structure the urls file to achieve what I need? For now, I am attaching a tilde in front of the listing urls as such: url(r'^~(?P<slug>[-\w\d]+)/$, ...) which may not be the best solution.