2👍
✅
Your first regex, r'^category/'
, matches both a URL with and without a UUID.
You should anchor it at the end:
r'^category/$'
Additionally/alternatively, you can swap the order of those URL definitions, as Django will take the first one it matches.
Source:stackexchange.com