1👍
✅
The second positional argument to reverse()
is urlconf
argument:
reverse(viewname[, urlconf=None, args=None, kwargs=None, current_app=None])
To make it work use keyword argument for setting args
:
path = reverse('pEventsCalendarDetail', args=(), kwargs={'slug':self.slug})
Or, don’t set args
at all:
path = reverse('pEventsCalendarDetail', kwargs={'slug':self.slug})
1👍
Don’t use both the permalink
decorator and the reverse()
call. They both do the same thing. Drop the decorator: it is deprecated.
Source:stackexchange.com