Commit 0eb8eb20 authored by Robert Hitt's avatar Robert Hitt

Allows hyphens in short URLs (closes issue#95)

- Just changed the regex for short urls in urls.py
parent 06cc5092
Pipeline #600 passed with stage
in 1 minute and 55 seconds
......@@ -22,7 +22,7 @@ urlpatterns = [
url(r'^$', go.views.index, name='index'),
# /view/<short> - View URL data.
url(r'^view/(?P<short>\w+)$', go.views.view, name='view'),
url(r'^view/(?P<short>[-\w]+)$', go.views.view, name='view'),
# /about - About page.
url(r'^about/?$', TemplateView.as_view(template_name='core/about.html'), name='about'),
......@@ -34,7 +34,7 @@ urlpatterns = [
url(r'^myLinks/?$', go.views.my_links, name='my_links'),
# /delete/<short> - Delete a link, no content display.
url(r'^delete/(?P<short>\w+)$', go.views.delete, name='delete'),
url(r'^delete/(?P<short>[-\w]+)$', go.views.delete, name='delete'),
# /registered - registration complete page
url(r'^registered/?$', TemplateView.as_view(template_name='registered.html'), name='registered'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment