[Django]-URL passes parameter in my Django project

3👍

Add a regex end-of-string character to the first pattern to prevent it from overlapping with the second.

url(r'^video/$', video, name='video'),
url(r'^video/(?P<cate>[A-Za-z]+)$', video, name='video'),

Leave a comment