date, time in local time
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% load tz %}
|
||||
{% get_current_timezone as TIME_ZONE %}
|
||||
{% load l10n %}
|
||||
{% block title %}Workouts{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -51,8 +53,7 @@
|
||||
<table width="100%" class="listtable shortpadded">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:80px"> Date</th>
|
||||
<th> Time</th>
|
||||
<th style="width:120px"> Date, Time</th>
|
||||
<th> Name</th>
|
||||
<th> Type</th>
|
||||
<th> Distance </th>
|
||||
@@ -76,8 +77,9 @@
|
||||
{% else %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
<td> {{ workout.date |truncatechars:15}} </td>
|
||||
<td> {{ workout.starttime }} </td>
|
||||
{% localtime on %}
|
||||
<td> {{ workout.startdatetime|localtime|date:"Y-m-d, H:i" }} </td>
|
||||
{% endlocaltime %}
|
||||
<td>
|
||||
{% if workout.user.user == user or user == team.manager %}
|
||||
{% if workout.rankingpiece %}
|
||||
|
||||
@@ -4341,17 +4341,17 @@ def workouts_view(request,message='',successmessage='',
|
||||
if theteam.viewing == 'allmembers' or theteam.manager == request.user:
|
||||
workouts = Workout.objects.filter(team=theteam,
|
||||
startdatetime__gte=startdate,
|
||||
startdatetime__lte=enddate).order_by("-date", "-starttime")
|
||||
startdatetime__lte=enddate).order_by("-startdatetime")
|
||||
g_workouts = Workout.objects.filter(team=theteam,
|
||||
startdatetime__gte=activity_startdate,
|
||||
startdatetime__lte=activity_enddate).order_by("-date", "-starttime")
|
||||
elif theteam.viewing == 'coachonly':
|
||||
workouts = Workout.objects.filter(team=theteam,user=r,
|
||||
startdatetime__gte=startdate,
|
||||
startdatetime__lte=enddate).order_by("-date","-starttime")
|
||||
startdatetime__lte=enddate).order_by("-startdatetime")
|
||||
g_workouts = Workout.objects.filter(team=theteam,user=r,
|
||||
startdatetime__gte=activity_startdate,
|
||||
enddatetime__lte=activity_enddate).order_by("-date","-starttime")
|
||||
enddatetime__lte=activity_enddate).order_by("-startdatetime")
|
||||
|
||||
|
||||
else:
|
||||
@@ -4361,7 +4361,7 @@ def workouts_view(request,message='',successmessage='',
|
||||
startdatetime__lte=enddate).order_by("-date", "-starttime")
|
||||
g_workouts = Workout.objects.filter(user=r,
|
||||
startdatetime__gte=activity_startdate,
|
||||
startdatetime__lte=activity_enddate).order_by("-date","-starttime")
|
||||
startdatetime__lte=activity_enddate).order_by("-startdatetime")
|
||||
|
||||
query = request.GET.get('q')
|
||||
if query:
|
||||
|
||||
Reference in New Issue
Block a user