Hello all,
i have an application (Django 1.4 LTS) that can be accessed with 2 urls:
the default is https://my.app.org
and the second is http://consult.my.app.org
In the templates, i'm using:
<h1><a href="{% url 'auth_login' %}">{% trans "Connect to see more features" %}</a></h1>
and it's displayed as https://my.app.org/accounts/login if we access from https://my.app.org but http://consult.my.app.org/accounts/login if the second one.
For few href in templates, i need to change the rendreed url, forcing it to the first form or the second form, not depending on the user experience.
I'm wondering if it is possible to change it in Django (not in apache by using redirection)? for instance with Sites?
<a href="{% url 'auth_login'|rewrite_url %} ? or something else?
if you browse http://consult.my.app.org/, i want href login to be https://my.app.org/accounts/login, not http://consult.my.app.org/accounts/login
or sometimes if user needs events/1352747/ical/, i want to force the resulting as
http://consult.calendrier.emath.fr/events/1352747/ical/
not https://....