Reversing Django Views and URLs

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025

ความคิดเห็น • 15

  • @pranabsarma4151
    @pranabsarma4151 ปีที่แล้ว

    Hi Dr Chuck! Why you have not used reverse_lazy() for the u3? 11:40

  • @SisiraSomaratne
    @SisiraSomaratne 4 ปีที่แล้ว +6

    Thank you for explaining it.
    But what is the difference between reverse and reverse_lazy ?

    • @mehmedkukavica8076
      @mehmedkukavica8076 2 ปีที่แล้ว

      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.

  • @maremagnumHojarasca
    @maremagnumHojarasca 11 หลายเดือนก่อน

    Your videos are pure gold, thanks so much!

  • @Gauravsharma-gs9dt
    @Gauravsharma-gs9dt 5 ปีที่แล้ว +1

    best resource to learn this confusing url resolver concept.. keep it up

  • @O30495
    @O30495 4 ปีที่แล้ว +1

    That explained sooo much, Ive been having this problem for months and no was able to explain it properly like you

  • @juniornicolodi
    @juniornicolodi 2 ปีที่แล้ว

    great content, you are a greate teacher!

  • @tulczi
    @tulczi 4 ปีที่แล้ว

    that's a great explanation, really, thanks :)

  • @durandekamga2298
    @durandekamga2298 3 ปีที่แล้ว

    Great explaination !!!

  • @ImmediatelyLeaveYT
    @ImmediatelyLeaveYT 3 ปีที่แล้ว

    thank you so much!

  • @KevinTempelx
    @KevinTempelx 4 ปีที่แล้ว

    Thanks!

  • @sk7w4tch3r
    @sk7w4tch3r 4 ปีที่แล้ว

    thank you :)

  • @vishalmishra1937
    @vishalmishra1937 4 ปีที่แล้ว

    reverse vs reverse_lazy

  • @mehmedkukavica8076
    @mehmedkukavica8076 2 ปีที่แล้ว

    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)