Bug fix on dashboard week number
This commit is contained in:
parent
5bd76cc35a
commit
184ac55e44
|
@ -91,13 +91,9 @@ def home(request):
|
|||
"""
|
||||
Génère la page d'accueil du site basée sur la saison (si celle-ci est connue)
|
||||
"""
|
||||
# print("In home function")
|
||||
today = pendulum.now().date()
|
||||
today = timezone.now() # pendulum.now().date()
|
||||
_, week_number = from_date_to_week_number(today)
|
||||
week_number = 42
|
||||
event_list = Event.objects.filter(date_begin__gte=timezone.now()).order_by(
|
||||
"date_begin"
|
||||
)[:10]
|
||||
event_list = Event.objects.filter(date_begin__gte=today).order_by("date_begin")[:10]
|
||||
|
||||
quote = Citation.objects.order_by("?").first()
|
||||
|
||||
|
@ -111,7 +107,7 @@ def home(request):
|
|||
| Q(known_skills__created_at__gt=request.user.last_login)
|
||||
).distinct()
|
||||
|
||||
limit_date = timezone.now() - timedelta(days=14)
|
||||
limit_date = today - timedelta(days=14)
|
||||
waiting_update_gymnast = Gymnast.objects.exclude(
|
||||
Q(is_active=False)
|
||||
| Q(mindstate__created_at__gte=limit_date)
|
||||
|
@ -163,7 +159,6 @@ def home(request):
|
|||
"percentage_week": percentage_week,
|
||||
"birthday_list": birthday_list,
|
||||
}
|
||||
# print("out home function")
|
||||
return render(request, "dashboard/dashboard.html", context)
|
||||
# return render(request, "dashboard/dashboard.html", {})
|
||||
|
||||
|
|
|
@ -42,10 +42,10 @@
|
|||
<br />
|
||||
{% endif %}
|
||||
<li>
|
||||
<b>10 |</b> : {% if best_straightjump %}<b>{{ best_straightjump.0.tof }}</b> ({{ best_straightjump.0.date | date:"d-m-Y" }}{% else %} <span class="text-muted">no information</span>{% endif %}
|
||||
<b>10 |</b> : {% if best_straightjump %}<b>{{ best_straightjump.0.tof }}</b> ({{ best_straightjump.0.date | date:"d-m-Y" }}{% else %} <span class="text-muted">(no information)</span>{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<b>Routine</b> : {% if best_routine %}<b>{{ best_routine.0.tof }}</b> ({{ best_routine.0.date | date:"d-m-Y" }}){% else %} <span class="text-muted">no information</span>{% endif %}
|
||||
<b>Routine</b> : {% if best_routine %}<b>{{ best_routine.0.tof }}</b> ({{ best_routine.0.date | date:"d-m-Y" }}){% else %} <span class="text-muted">(no information)</span>{% endif %}
|
||||
</li>
|
||||
{% if user_is_trainer %}
|
||||
<a href="{% url 'add_season_information_for_gymnast' gymnast.id %}">Add season details</a> -
|
||||
|
|
Loading…
Reference in New Issue