2👍
✅
In your code, change the reverse('notecards:index', ())
to reverse('notecards:index')
. The signature of reverse
is
reverse(viewname, urlconf=None, args=None, kwargs=None, prefix=None, current_app=None)
You could see that urlconf
mistakenly takes ()
instead of args
taking it.
Moreover, have a look at the django.shortcuts.resolve_url
, it’s easier for normal use.
👤okm
Source:stackexchange.com