[Answer]-Django Reserved Url Names

1👍

Your category url pattern is evaluated before the other patterns.
You could move it to the bottom, so all of the others will be evaluated first.
So move this line to the bottom:

url(r'^(.+)/', views.kategori),

See also URL dispatching:

Django runs through each URL pattern, in order, and stops at the first one that matches the requested URL.

0👍

The URL routing patterns are evaluated in order. You need to either move your category route url(r'^(.+)/', views.kategori), down to the bottom, as ^(.+) matches everything with one or more letters plus a slash, or change the regular expression from '^(.+)/' to something like '^(category.+)/'.

👤Anton

Leave a comment