I have a problem since I tried to use get_absolute_url(self): to enter in a url beyond a photo. When I used , my index.html stopped running.
I have a problem since I tried to use get_absolute_url(self): to enter in a url beyond a photo. When I used , my index.html stopped running.
Here I have the top level url.py
from import admin
<span class="kwd" style="font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; li
n
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANfN%3DK9zqMGm5hxVMSQsNfS%2ByBKyuMLayv0ARK6ofuT9hg2%2BSg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAOTVoPANyFBchm-gK28YRJ_TtNaT3p%3DOHoUZco6Wzu2PKybs8A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAS5AE5ZD_LetM2Z3oEaXq8MyALDBMYAsxW3yDk66r%2B2PyfypQ%40mail.gmail.com.
Hi Bruno Gama,
Try this, update
reverse('courses:datails', (), {'slug': self.slug})
as
reverse('courses:datails', kwargs={'slug': self.slug})
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAOTVoPAv1HJr_HOQuDCoWtsv-Mo6L6Fc6jBqaO29-eeTk86XBQ%40mail.gmail.com.
def get_absolute_url(self):
return '%s' % self.slug
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAS5AE5p%2BRkZB-2%3DhyPesGvu-f_8pAURbmPy5QfxF3DwGPRoEw%40mail.gmail.com.