I recommend putting two entries on urls.py, they can both point to the same
view.
Just be sure to set a default value for subpage_slug on the function
argument

On Wed, Nov 8, 2017 at 3:01 PM, <cjacque...@gmail.com> wrote:

> Hi everyone,
>
> I would like to make a documentation app with urls like this (not
> flatpages) :
>
> [server]/docs/<product_slug>/ ==> go to product main help page
>
> [server]/docs/<product_slug>/<subpage_slug>/ ==> go to product sub help
> page.
>
> How can i write this in app urls.py ?
>
> Thanks !
>
>
> --
> 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/3d4f0a0d-dc46-488a-9aec-a97120518e64%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/3d4f0a0d-dc46-488a-9aec-a97120518e64%40googlegroups.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/CAFWa6tK_vXmd9Epkif%3DC3%2BWvpFs-WAzoEAmpePHe%3DUB276zD7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to