Setup ManifestStaticFilesStorage
This commit is contained in:
parent
f8b1afcf72
commit
e28dd82aa5
7 changed files with 19 additions and 14 deletions
|
|
@ -112,6 +112,8 @@ INSTALLED_APPS = (
|
|||
|
||||
FILE_UPLOAD_HANDLERS = ["django.core.files.uploadhandler.TemporaryFileUploadHandler"]
|
||||
|
||||
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
|
||||
|
||||
ALLOWED_HOSTS = ['localhost', 'stages.pierre-coullery.ch']
|
||||
|
||||
# Mapping between column names of a tabular file and Student field names
|
||||
|
|
|
|||
|
|
@ -151,12 +151,12 @@ $(document).ready(function() {
|
|||
$('#student_detail').load(
|
||||
'/student/' + $(this).val() + '/summary/?period=' + $.cookie('periode'),
|
||||
function() {
|
||||
$('div#previous_stages_head').toggle(function() {
|
||||
$('div#previous_stages_head').click(function() {
|
||||
$('ul#previous_stages_list').toggle();
|
||||
$(this).find('img').attr('src', static_url + 'img/open.png');
|
||||
}, function() {
|
||||
$('ul#previous_stages_list').toggle();
|
||||
$(this).find('img').attr('src', static_url + 'img/closed.png');
|
||||
var img = $(this).find('img');
|
||||
var cur_img = img.attr('src');
|
||||
img.attr('src', img.data('imgtoggle'));
|
||||
img.data('imgtoggle', cur_img);
|
||||
});
|
||||
}).addClass("filled");
|
||||
current_student = $(this).val();
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
<script type="text/javascript" src="{% static 'admin/js/admin/RelatedObjectLookups.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'js/attribution.js' %}"></script>
|
||||
<script type="text/javascript" src="{% static 'js/jquery.cookie.js' %}"></script>
|
||||
<script type="text/javascript">var static_url = '{{ STATIC_URL }}';</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
{% block content %}
|
||||
<h2>{{ klass.name }}</h2>
|
||||
<div style="float:right;">
|
||||
<a href="{% url 'class' object.pk %}?format=xls"><img src="{{ STATIC_URL}}img/xls.png" title="Exportation Excel" width="24"></a>
|
||||
<a href="{% url 'class' object.pk %}?format=xls"><img src="{% static 'img/xls.png' %}" title="Exportation Excel" width="24"></a>
|
||||
</div>
|
||||
<h3>Récapitulatif des stages</h3>
|
||||
<table>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<td>{{ student.birth_date }}</td>
|
||||
{% for train in student.training_set.all %}
|
||||
<td>{{ train.availability.period }}<br>{{ train.availability.corporation }}<br>
|
||||
{% if train.comment %}<div style="float: right;"><img src="{{ STATIC_URL}}admin/img/icon-unknown.svg" title="{{ train.comment }}"></div>{% endif %}
|
||||
{% if train.comment %}<div style="float: right;"><img src="{% static 'admin/img/icon-unknown.svg' %}" title="{{ train.comment }}"></div>{% endif %}
|
||||
<i>{{ train.availability.domain }}</i></td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block extrastyle %}
|
||||
<style>
|
||||
|
|
@ -17,7 +17,9 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div style="float:right;"><a href="{% url 'admin:stages_corporation_change' corp.pk %}"><img src="{{ STATIC_URL }}img/edit.png" title="Modifier"></a></div>
|
||||
<div style="float:right;">
|
||||
<a href="{% url 'admin:stages_corporation_change' corp.pk %}"><img src="{% static 'img/edit.png' %}" title="Modifier"></a>
|
||||
</div>
|
||||
<h2>{{ corp.name }}</h2>
|
||||
<table width="100%">
|
||||
<tr><th rowspan="2">Adresse :</th>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{% load static %}
|
||||
<div id="previous_stages">
|
||||
<div id="previous_stages_head">
|
||||
<em><img src="{{ STATIC_URL }}img/closed.png"> Stages précédents ({{ previous_stages|length }}) :</em>
|
||||
<em><img src="{% static 'img/closed.png' %}" data-imgtoggle="{% static 'img/open.png' %}"> Stages précédents ({{ previous_stages|length }}) :</em>
|
||||
</div>
|
||||
<ul id="previous_stages_list">
|
||||
{% for stage in previous_stages %}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
{% load static %}
|
||||
{% for obj in trainings %}
|
||||
<li id="training_{{ obj.id }}">{{ obj.student }} ({{ obj.student.klass }}) - {{ obj.availability.corporation }} - {{ obj.availability.domain }}
|
||||
{% if obj.referent %} (réf: {{ obj.referent }}){% else %}- <span class="missing">Pas de référent</span>{% endif %}
|
||||
{% if obj.availability.contact %} (cont: {{ obj.availability.contact }}){% else %}- <span class="missing">Pas de contact</span>{% endif %}
|
||||
<a class="edit_training" href="{% url 'admin:stages_training_change' obj.id %}"><img src="{{ STATIC_URL}}admin/img/icon-changelink.svg"></a>
|
||||
<img class="delete_training" src="{{ STATIC_URL}}admin/img/icon-deletelink.svg">
|
||||
<a class="edit_training" href="{% url 'admin:stages_training_change' obj.id %}"><img src="{% static 'admin/img/icon-changelink.svg' %}"></a>
|
||||
<img class="delete_training" src="{% static 'admin/img/icon-deletelink.svg' %}">
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue