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://....
Thans in advance for help,
--
GĂ©rard Henry
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/545F2AB9.7080906%40gmail.com.
For more options, visit https://groups.google.com/d/optout.