Tsallaka zuwa abun ciki
Justice Tech School

Named URLs and reverse

Use names instead of hard coded paths.

Example
from django.urls import reverse
url = reverse("post_detail", args=[5])
print(url)

Exercise

Build a URL.

("home")

Quiz Test

Why name URLs?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.