Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Probably better urlpattern with unicode support

  • Loading branch information...
commit 82d2c1436d6d4b4b57e826c89b7b58df20b39522 1 parent 3ddb67d
@neoascetic authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 cms/urls.py
View
8 cms/urls.py
@@ -4,10 +4,8 @@
from django.conf import settings
from django.conf.urls.defaults import url, patterns
-if settings.APPEND_SLASH:
- reg = url(r'^(?P<slug>[0-9A-Za-z-_.//]+)/$', details, name='pages-details-by-slug')
-else:
- reg = url(r'^(?P<slug>[0-9A-Za-z-_.//]+)$', details, name='pages-details-by-slug')
+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
@@ -23,4 +21,4 @@
urlpatterns = get_app_patterns() + urlpatterns
#urlpatterns = (dynamic_app_regex_url_resolver, ) + urlpatterns
-urlpatterns = patterns('', *urlpatterns)
+urlpatterns = patterns('', *urlpatterns)
Please sign in to comment.
Something went wrong with that request. Please try again.