I'm trying to wrap my head around Django concepts, but I struggle with the URLResolver reverse_lazy()
. As far as I know, I have to use reverse_lazy()
when I want to reverse to an URL that has not been loaded. So when I create a CBV and state a success_url
, I use reverse_lazy()
. This means that the URL is not imported when the file executes.
This is confusing to me because I think the server loads all the URLs while starting before executing anything. So how come the URL is not loaded in time of execution?
I would be very happy if someone would give me an answer to this.