My project is using django-subdomains
and django-allauth
to handle subdomains and auth system.
It has a couple of subdomains: company1.project.com, company2.project.com
Some of views are using @login_required
decorator that redirects user to LOGIN_URL = '/login/'
at settings.py
Ex: user is at company1.project.com
and calls view which redirects him to company1.project.com/login/
I need to redirect users to the project.com/login/
django-subdomains
have tool reverse('login')
which returns project.com/login/
if I do not pass subdomain argument, but I cannot use it in settings for LOGIN_URL
because django apps are not loaded yet.