I have an app that serves pages like this /stage/stagename. stagename is variable. The URL mappers just look for a [0-9A-Za-z]+ to fill that slot.
Now, because of my setup, My app will be rooted at /stage/stagename. I cannot change this (without massive changes to my setup which is too tedious right now and a last option).
I need to use django.contrib.auth. The login and logout URLs can't be in my settings file since they will change depend on where my app is rooted (For one it might be /stage/foo/login and for the other, it might might /stage/bar/login).
How can I make the backend use such dynamic URLs?
I also have the issue that I need to pass the stagename parameter to the template which generates my URL. How can I do that?