urls 1.11 use task how to use 3.0.6 version

16 views
Skip to first unread message

Adya Mit

unread,
Jun 15, 2020, 9:21:51 AM6/15/20
to Django users
(?P<id>\d+)/$ django 

Kayode Oladipo

unread,
Jun 15, 2020, 12:52:29 PM6/15/20
to django...@googlegroups.com
Use the path( ) method.

from django.urls import path

path('<int:id>',...)

On Mon, Jun 15, 2020, 2:21 PM Adya Mit <adyam...@gmail.com> wrote:
(?P<id>\d+)/$ django 

--
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/ef4349f0-5f82-4b4d-85e9-60bc63c5ba08o%40googlegroups.com.

Kelvin Sajere

unread,
Jun 15, 2020, 3:55:28 PM6/15/20
to django...@googlegroups.com
You can now easily write your URL patterns like this.

from django.urls import path

urlpatterns = [
    path("<int:pk>", someview, name="somename")
]




--
KeLLs
Reply all
Reply to author
Forward
0 new messages