Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 24 lines (20 sloc) 0.789 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# -*- coding: utf-8 -*-
from cms.apphook_pool import apphook_pool
from cms.views import details
from django.conf import settings
from django.conf.urls.defaults import url, patterns

reg_re = r'(?u)^(?P<slug>[-.//\w]+)%s$' % (settings.APPEND_SLASH and '/' or '')
reg = url(reg_re, details, name='pages-details-by-slug')

urlpatterns = [
    # Public pages
    url(r'^$', details, {'slug':''}, name='pages-root'),
    reg,
]

if apphook_pool.get_apphooks():
    """If there are some application urls, add special resolver, so we will
have standard reverse support.
"""
    from cms.appresolver import get_app_patterns
    urlpatterns = get_app_patterns() + urlpatterns
    #urlpatterns = (dynamic_app_regex_url_resolver, ) + urlpatterns
    
urlpatterns = patterns('', *urlpatterns)
Something went wrong with that request. Please try again.