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