The slug must be descriptive of the record. It is often derived from a
value such as a blog title. A good slug is useful for SEO purposes as it
can contain descriptive keywords.

I just sent more reading on slugs from the official Django docs.

Kind regards,
Sithu


*Sent with Shift
<https://tryshift.com/?utm_source=SentWithShift&utm_campaign=Sent%20with%20Shift%20Signature&utm_medium=Email%20Signature&utm_content=General%20Email%20Group>*

On Tue, Apr 9, 2019 at 8:51 PM John <johncrosb...@gmail.com> wrote:

> Hello maybe someone could help me, Im working on an example similar to the
> DetailView for Generic Display Views
>
>
> https://docs.djangoproject.com/en/2.2/ref/class-based-views/generic-display/#detailview
>
> In the example below taken from the djangoproject website Im stuck as to
> what url I should be visiting in the browser to view this? What replaces
> <slug:slug> in the browser?
>
> *Example myapp/urls.py*:
>
> from django.urls import path
> from article.views import ArticleDetailView
> urlpatterns = [
>     path('<slug:slug>/', ArticleDetailView.as_view(), name='article-detail'),]
>
> Many thanks :)
>
> John
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/60259376-A376-4D4B-8F12-8D506C43C8AB%40gmail.com
> <https://groups.google.com/d/msgid/django-users/60259376-A376-4D4B-8F12-8D506C43C8AB%40gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAH-SnCDC9VNJfV9no41%2BLNvsor64wUi%3DEOOfywizOqhofk1YEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to