Ajout debug (et correction de quelques détails)
This commit is contained in:
parent
33e2d1a90a
commit
67433f2b72
@ -254,3 +254,25 @@ if DEBUG:
|
|||||||
import socket
|
import socket
|
||||||
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
|
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>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<header{% if day.is_today %} id="today"{% 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>
|
</header>
|
||||||
{% if day.events %}
|
{% if day.events %}
|
||||||
{% if resume %}
|
{% if resume == 1 %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for category, events in day.events_by_category_ordered %}
|
{% for category, events in day.events_by_category_ordered %}
|
||||||
<li>{{ events.0.category | circle_cat }}
|
<li>{{ events.0.category | circle_cat }}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
{% if event.exact_location %}
|
{% if event.exact_location %}
|
||||||
{% if nolink %}
|
{% if nolink %}
|
||||||
{{ event.exact_location.name }}{% if not nocity %}, {{ event.exact_location.city }}{% endif %}
|
{{ event.exact_location.name }}, {{ event.exact_location.city }}
|
||||||
{% else %}
|
{% 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 %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if perms.agenda_culturel.change_event and perms.agenda_culturel.change_place %}
|
{% if perms.agenda_culturel.change_event and perms.agenda_culturel.change_place %}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{% load tag_extra %}
|
{% load tag_extra %}
|
||||||
{% load utils_extra %}
|
{% load utils_extra %}
|
||||||
|
|
||||||
{% if not noarticle %}
|
{% if noarticle == 0 %}
|
||||||
<article id="filters">
|
<article id="filters">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div>
|
<div>
|
||||||
@ -23,9 +23,6 @@
|
|||||||
{% for s in filter.get_status_names %}
|
{% for s in filter.get_status_names %}
|
||||||
{{ s }}
|
{{ s }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for c in filter.get_cities %}
|
|
||||||
{{ c }}
|
|
||||||
{% endfor %}
|
|
||||||
{{ filter.get_recurrence_filtering }}
|
{{ filter.get_recurrence_filtering }}
|
||||||
{{ filter.get_position_radius }}
|
{{ filter.get_position_radius }}
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -70,6 +67,6 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if not noarticle %}
|
{% if noarticle == 0 %}
|
||||||
</article>
|
</article>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% with container_id=widget.attrs.id %}
|
{% 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">
|
<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 %}
|
{{ widget.value.instance | circle_cat }}{% include widget.template_name %}</div>{% endfor %}{% if group %}
|
||||||
</div>{% endif %}{% endfor %}
|
</div>{% endif %}{% endfor %}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% with container_id=widget.attrs.id %}
|
{% 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">
|
<div><label>{{ group }}</label>{% endif %}{% for widget in options %}<div role="button" class="small-cat">
|
||||||
{% include widget.template_name %}</div>{% endfor %}{% if group %}
|
{% include widget.template_name %}</div>{% endfor %}{% if group %}
|
||||||
</div>{% endif %}{% endfor %}
|
</div>{% endif %}{% endfor %}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
{% with cache_timeout=user.is_authenticated|yesno:"30,600" %}
|
{% with cache_timeout=user.is_authenticated|yesno:"30,600" %}
|
||||||
{% cache cache_timeout month user.is_authenticated calendar.firstdate filter.to_str LANGUAGE_CODE %}
|
{% 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>
|
<article>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
{% with cache_timeout=user.is_authenticated|yesno:"30,600" %}
|
{% with cache_timeout=user.is_authenticated|yesno:"30,600" %}
|
||||||
{% cache cache_timeout week user.is_authenticated calendar.firstdate filter.to_str LANGUAGE_CODE %}
|
{% 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>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
{% for d in calendar.calendar_days_list %}
|
{% 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 %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="slider-button slider-button-inside button-right hidden">{% picto_from_name "arrow-right" %}</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