reverse_lazy()¶ A lazily evaluated version of reverse(). reverse_lazy(viewname, urlconf=None, args=None, kwargs=None, current_app=None)¶ It is useful for when you need to use a URL reversal before your project’s URLConf is loaded. Some common cases where this function is necessary are: providing a reversed URL as the url attribute of a generic class-based view. providing a reversed URL to a decorator (such as the login_url argument for the django.contrib.auth.decorators.permission_required() decorator). providing a reversed URL as a default value for a parameter in a function’s signature.
Great, but nothing intuitive. Pure technology. Thank you, professor, for your effort and for making it possible for us to learn much more easily than having to study documentation. I modified the second.html code a bit and it works like crazy.
Hi Dr Chuck! Why you have not used reverse_lazy() for the u3? 11:40
Thank you for explaining it.
But what is the difference between reverse and reverse_lazy ?
reverse_lazy()¶
A lazily evaluated version of reverse().
reverse_lazy(viewname, urlconf=None, args=None, kwargs=None, current_app=None)¶
It is useful for when you need to use a URL reversal before your project’s URLConf is loaded. Some common cases where this function is necessary are:
providing a reversed URL as the url attribute of a generic class-based view.
providing a reversed URL to a decorator (such as the login_url argument for the django.contrib.auth.decorators.permission_required() decorator).
providing a reversed URL as a default value for a parameter in a function’s signature.
Your videos are pure gold, thanks so much!
best resource to learn this confusing url resolver concept.. keep it up
That explained sooo much, Ive been having this problem for months and no was able to explain it properly like you
great content, you are a greate teacher!
that's a great explanation, really, thanks :)
Great explaination !!!
thank you so much!
Thanks!
thank you :)
reverse vs reverse_lazy
Great, but nothing intuitive. Pure technology. Thank you, professor, for your effort and for making it possible for us to learn much more easily than having to study documentation.
I modified the second.html code a bit and it works like crazy.
go to gview dogs list (x2 from context)