Sunday, April 28, 2019

Django URLs

Hello Everyone,

I want to pass two url in url of template. I have added in urls.py also.

code:-
Index.html
<a href="{% url 'detail' detail.id %}" target="_blank">
In Up I want to pass slug. What Should I do.

urls.py:

path("detail/<int:id>/<str:slug>"),

Thanks For Help

--
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+unsubscribe@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/e9ecfa89-1175-405a-b3d4-f3808b7f2b0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment