new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
new absurl template tag can be used instead of template tag url to have absolute url
replacement of all LDT_MEDIA_PREFIX in different templates and views
{% extends "registration/base.html" %}
{% load i18n %}
{% load absstatic %}
{% load static %}
{% block js_declaration %}
<script type="text/javascript">
$(document).ready(function(){
$('.social_link').each(function(i){
{% if social_list %}
{% for backend_name in social_list %}
var coucou='ldt/img/logo_{{backend_name}}.png'
{% with "ldt/img/logo_"|add:backend_name|add:".png" as src_path %}
document.getElementById('{{backend_name}}_logo_id').src='{% absstatic src_path %}';
{% endwith %}
{% endfor %}
{% endif %}
});
});
</script>
{% endblock %}
{% block css_import %}
{{ block.super }}
<link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}'/>
<link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' />
{% endblock %}
{% block login %}
{% endblock %}
{% block content_title %}{% trans 'Log in' %}{% endblock %}
{% block iricontent %}
{% if form.errors %}
<p class="error">{% trans "Sorry, that's not a valid username or password." %}</p>
{% endif %}
<div class="span-24 last">
<form action="" method='post' id="login-form">
<div id="loginform_div" class="span-12">
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
<ul id="login_fields_list">
{{form.as_ul}}
</ul>
<ul>
<li><a href="{% url django.contrib.auth.views.password_reset %}" >{% trans "Forget password?" %}</a></li>
</ul>
<div id="submitcontent-buttons-login" class="span-24 last">
<button class="button"type="submit" value="login">{% trans "login" %}</button>
</div>
</div>
</form>
<div id="login_links" class="span-12 last">
<div id="login_links_list" class="span-12 last">
{% if social_list %}
<p>{% trans "Or login with your external account" %} :</p>
<ul>
{% for backend_name in social_list %}
<li><a href="{{ backend_name }}"><img class='social_link' id="{{backend_name}}_logo_id"/> {{ backend_name }}</a></li>
{% endfor %}
{% comment %}{{social_list|safe}}{% endcomment %}
</ul>
{% endif %}
</div>
</div>
</div>
{% endblock %}