1👍
✅
Notice the \d+
in this line:
url(r'^post/(?P<slug>\d+)/vote/$', 'main.views.vote', name='vote'),
\d+
means that it only takes numbers
The regex for a slug should be like this:
url(r'^post/(?P<slug>[-\w]+)/vote/$', 'main.views.vote', name='vote'),
as suggested in this answer https://stackoverflow.com/a/27322151/4724196
Hope this helps!
Source:stackexchange.com