diff options
| author | Mark Weiman <mark.weiman@markzz.com> | 2016-02-18 01:38:04 -0500 |
|---|---|---|
| committer | Mark Weiman <mark.weiman@markzz.com> | 2016-02-18 01:38:35 -0500 |
| commit | 8f33c2243a0f076ba3d6038c47e627c2a5a5eb82 (patch) | |
| tree | 4452669f8753ff41bfd2e693c06ad904f4df2654 /website | |
| parent | 1a3b03fd745d07c586064d35548b2747670e2238 (diff) | |
| download | website-8f33c2243a0f076ba3d6038c47e627c2a5a5eb82.tar.gz website-8f33c2243a0f076ba3d6038c47e627c2a5a5eb82.zip | |
allow hyphens and underscores in page links
Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Fixes an oversight regarding some special characters in a link to a page. With
this, one can use hyphens and underscores and nothing will blow up.
Diffstat (limited to 'website')
| -rw-r--r-- | website/urls.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/website/urls.py b/website/urls.py index a4f0cee..13bc2b7 100644 --- a/website/urls.py +++ b/website/urls.py @@ -27,7 +27,7 @@ urlpatterns = [ url(r'^home/', 'root.views.home', name='home'), url(r'^add/$', 'root.views.add', name='page-add'), url(r'^edit/$', 'root.views.edit_index', name='index-edit'), - url(r'^(?P<path>[a-zA-Z0-9]+)/$', 'root.views.page', name='page'), - url(r'^(?P<path>[a-zA-Z0-9]+)/edit/$', 'root.views.edit', name='page-edit'), + url(r'^(?P<path>[a-zA-Z0-9\-_]+)/$', 'root.views.page', name='page'), + url(r'^(?P<path>[a-zA-Z0-9\-_]+)/edit/$', 'root.views.edit', name='page-edit'), ] |
