Answer the question
In order to leave comments, you need to log in
What's wrong with URL dispatcher?
You need to process two urls. One of them is a more special case of the first.
In theory, it is necessary to put a more general case after the particular one, which will be processed first. But that doesn't happen. And I still don’t understand how to use negation in the url regular expression.
# Частный случай
url(r'^serial/(?P<serial_id>[\d]+)/s(?P<season_number>[\d]+)/$', video.season_view),
# Общий случай
url(r'^(?P<level0>([\w\d_-]+))/(?P<level1>([\w\d_-]+))/(?P<level2>[\w\d_-]+)/$', category.level3),
/serial/10/s12/
should handle a special case /foo/bar/baz/
- a general one. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question