About URL Resolving
Using the resolve_url()
function, you can allow your Django app users to set various types of URLs in the settings. For example, EASTER_EGG_URL
setting:
1 2 3 4 5 6 |
|
The resolve_url()
accepts an object that has a get_absolute_url()
method, a relative path (e.g. "./change/"
), a named URL path (e.g. "accounts:register"
), a lazily reversed URL path (e.g. reverse_lazy("accounts:register")
, or a full URL (e.g. "https://djangotricks.com"
).
Tips and Tricks Programming Django 5.x Django 4.2 Django 3.2
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.