Ajout debug (et correction de quelques détails)
This commit is contained in:
parent
33e2d1a90a
commit
67433f2b72
@ -253,4 +253,26 @@ ROBOTS_USE_SITEMAP = False
|
||||
if DEBUG:
|
||||
import socket
|
||||
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
||||
INTERNAL_IPS = [ip[: ip.rfind(".")] + ".1" for ip in ips] + ["127.0.0.1", "10.0.2.2"]
|
||||
INTERNAL_IPS = [ip[: ip.rfind(".")] + ".1" for ip in ips] + ["127.0.0.1", "10.0.2.2"]
|
||||
|
||||
# logging
|
||||
|
||||
level_debug = "DEBUG" if DEBUG else "ERROR"
|
||||
LOGGING = {
|
||||
"version": 1,
|
||||
"disable_existing_loggers": False,
|
||||
"handlers": {
|
||||
"file": {
|
||||
"level": level_debug,
|
||||
"class": "logging.FileHandler",
|
||||
"filename": "backend.log",
|
||||
},
|
||||
},
|
||||
"loggers": {
|
||||
"django": {
|
||||
"handlers": ["file"],
|
||||
"level": level_debug,
|
||||
"propagate": True,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -20,10 +20,10 @@
|
||||
</script>
|
||||
{% endif %}
|
||||
<header{% if day.is_today %} id="today"{% endif %}>
|
||||
<{% if headers %}{{ headers }}{% else %}h2{% endif %}><a href="{{ day.date | url_day }}?{{ filter.get_url }}">{{ day.date | date:"l j" }}</a></{% if headers %}{{ headers }}{% else %}h2{% endif %}>
|
||||
<{% if headers != "" %}{{ headers }}{% else %}h2{% endif %}><a href="{{ day.date | url_day }}?{{ filter.get_url }}">{{ day.date | date:"l j" }}</a></{% if headers != "" %}{{ headers }}{% else %}h2{% endif %}>
|
||||
</header>
|
||||
{% if day.events %}
|
||||
{% if resume %}
|
||||
{% if resume == 1 %}
|
||||
<ul>
|
||||
{% for category, events in day.events_by_category_ordered %}
|
||||
<li>{{ events.0.category | circle_cat }}
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
{% if event.exact_location %}
|
||||
{% if nolink %}
|
||||
{{ event.exact_location.name }}{% if not nocity %}, {{ event.exact_location.city }}{% endif %}
|
||||
{{ event.exact_location.name }}, {{ event.exact_location.city }}
|
||||
{% else %}
|
||||
<a href="{% url 'view_place' event.exact_location.pk %}">{{ event.exact_location.name }}{% if not nocity %}, {{ event.exact_location.city }}{% endif %}</a>
|
||||
<a href="{% url 'view_place' event.exact_location.pk %}">{{ event.exact_location.name }}, {{ event.exact_location.city }}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if perms.agenda_culturel.change_event and perms.agenda_culturel.change_place %}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% load tag_extra %}
|
||||
{% load utils_extra %}
|
||||
|
||||
{% if not noarticle %}
|
||||
{% if noarticle == 0 %}
|
||||
<article id="filters">
|
||||
{% endif %}
|
||||
<div>
|
||||
@ -23,9 +23,6 @@
|
||||
{% for s in filter.get_status_names %}
|
||||
{{ s }}
|
||||
{% endfor %}
|
||||
{% for c in filter.get_cities %}
|
||||
{{ c }}
|
||||
{% endfor %}
|
||||
{{ filter.get_recurrence_filtering }}
|
||||
{{ filter.get_position_radius }}
|
||||
{% else %}
|
||||
@ -70,6 +67,6 @@
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
{% if not noarticle %}
|
||||
{% if noarticle == 0 %}
|
||||
</article>
|
||||
{% endif %}
|
||||
|
@ -6,7 +6,7 @@
|
||||
</label>
|
||||
</div>
|
||||
{% with container_id=widget.attrs.id %}
|
||||
<div class="options-filter" id="{{ widget.attrs.id }}"{% if widget.attrs.class %} class="{{ widget.attrs.class }}"{% endif %} data-button="{{ widget.attrs.id }}-button">{% for group, options, index in widget.optgroups %}{% if group %}
|
||||
<div class="options-filter" id="{{ widget.attrs.id }}" data-button="{{ widget.attrs.id }}-button">{% for group, options, index in widget.optgroups %}{% if group %}
|
||||
<div><label>{{ group }}</label>{% endif %}{% for widget in options %}<div role="button" class="small-cat contrast">
|
||||
{{ widget.value.instance | circle_cat }}{% include widget.template_name %}</div>{% endfor %}{% if group %}
|
||||
</div>{% endif %}{% endfor %}
|
||||
|
@ -6,7 +6,7 @@
|
||||
</label>
|
||||
</div>
|
||||
{% with container_id=widget.attrs.id %}
|
||||
<div class="options-filter" id="{{ widget.attrs.id }}"{% if widget.attrs.class %} class="{{ widget.attrs.class }}"{% endif %} data-button="{{ widget.attrs.id }}-button">{% for group, options, index in widget.optgroups %}{% if group %}
|
||||
<div class="options-filter" id="{{ widget.attrs.id }}" data-button="{{ widget.attrs.id }}-button">{% for group, options, index in widget.optgroups %}{% if group %}
|
||||
<div><label>{{ group }}</label>{% endif %}{% for widget in options %}<div role="button" class="small-cat">
|
||||
{% include widget.template_name %}</div>{% endfor %}{% if group %}
|
||||
</div>{% endif %}{% endfor %}
|
||||
|
@ -27,7 +27,7 @@
|
||||
{% with cache_timeout=user.is_authenticated|yesno:"30,600" %}
|
||||
{% cache cache_timeout month user.is_authenticated calendar.firstdate filter.to_str LANGUAGE_CODE %}
|
||||
|
||||
{% include "agenda_culturel/filter-inc.html" with filter=filter %}
|
||||
{% include "agenda_culturel/filter-inc.html" with filter=filter noarticle=0 %}
|
||||
|
||||
|
||||
<article>
|
||||
|
@ -24,7 +24,7 @@
|
||||
{% with cache_timeout=user.is_authenticated|yesno:"30,600" %}
|
||||
{% cache cache_timeout week user.is_authenticated calendar.firstdate filter.to_str LANGUAGE_CODE %}
|
||||
|
||||
{% include "agenda_culturel/filter-inc.html" with filter=filter %}
|
||||
{% include "agenda_culturel/filter-inc.html" with filter=filter noarticle=0 %}
|
||||
|
||||
<article>
|
||||
<header>
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
<div class="grid">
|
||||
{% for d in calendar.calendar_days_list %}
|
||||
{% include "agenda_culturel/day-inc.html" with day=d fixed_style=calendar.all_in_past filter=filter %}
|
||||
{% include "agenda_culturel/day-inc.html" with day=d resume=0 fixed_style=calendar.all_in_past filter=filter headers="" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="slider-button slider-button-inside button-right hidden">{% picto_from_name "arrow-right" %}</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user