You can now easily write your URL patterns like this.

from django.urls import path

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


On Mon, Jun 15, 2020 at 5:52 PM Kayode Oladipo <oladipokayo...@gmail.com>
wrote:

> Use the path( ) method.
>
> from django.urls import path
>
> path('<int:id>',...)
>
> On Mon, Jun 15, 2020, 2:21 PM Adya Mit <adyamit...@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+unsubscr...@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
>> <https://groups.google.com/d/msgid/django-users/ef4349f0-5f82-4b4d-85e9-60bc63c5ba08o%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BARzD-%2B0qcXSsZHeeXMVBZnozkpjDHgvSH2BfqcuLkpmdUTmQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2BARzD-%2B0qcXSsZHeeXMVBZnozkpjDHgvSH2BfqcuLkpmdUTmQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
KeLLs

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADYqDX2DXETbtMTHbhkjYgU0iohLQJQNscBJp-ccau2uTo5HKg%40mail.gmail.com.

Reply via email to