represent level in state url as short_label, not its id

This commit is contained in:
Laura Klünder 2017-10-31 16:08:20 +01:00
parent 3294704aee
commit e98c38e5fb
4 changed files with 45 additions and 13 deletions

View file

@ -2,7 +2,7 @@ from django.conf.urls import url
from c3nav.site.views import map_index
pos = r'(@(?P<level>\d+),(?P<x>\d+(\.\d+)?),(?P<y>\d+(\.\d+)?),(?P<zoom>\d+(\.\d+)?))?'
pos = r'(@(?P<level>[a-z0-9-_:]+),(?P<x>\d+(\.\d+)?),(?P<y>\d+(\.\d+)?),(?P<zoom>\d+(\.\d+)?))?'
urlpatterns = [
url(r'^r/(?P<origin>([a-z0-9-_:]+)?)/(?P<destination>([a-z0-9-_:]+)?)/%s$' % pos, map_index, name='site.index'),