[FIX] website: correct unslugify of routes

This commit is contained in:
Christophe Simonis
2014-08-19 16:43:23 +02:00
parent a8fc1a3e4f
commit b3ddbee543
+2 -1
View File
@@ -121,7 +121,8 @@ def slug(value):
return "%s-%d" % (slugname, id)
_UNSLUG_RE = re.compile(r'(?:(\w{1,2}|\w[a-z0-9-_]+?\w)-)?(-?\d+)(?=$|/)', re.I)
# NOTE: as the pattern is used as it for the ModelConverter (ir_http.py), do not use any flags
_UNSLUG_RE = re.compile(r'(?:(\w{1,2}|\w[A-Za-z0-9-_]+?\w)-)?(-?\d+)(?=$|/)')
def unslug(s):
"""Extract slug and id from a string.