Private
Public Access
1
0

Merge branch 'feature/sliders' into develop

This commit is contained in:
sanderroosendaal
2016-10-31 15:36:12 +01:00
259 changed files with 228 additions and 21281 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,244 +0,0 @@
#: .\cvkbrno\models.py:16
msgid "Boat Category"
msgstr ""
#: .\cvkbrno\models.py:19
msgid "boat category"
msgstr ""
#: .\cvkbrno\models.py:20
msgid "boat categories"
msgstr ""
#: .\cvkbrno\models.py:34
msgid "coach"
msgstr ""
#: .\cvkbrno\models.py:35 .\cvkbrno\models.py:40
msgid "member"
msgstr ""
#: .\cvkbrno\models.py:36
msgid "administrator"
msgstr ""
#: .\cvkbrno\models.py:41
msgid "members"
msgstr ""
#: .\cvkbrno\models.py:49
msgid "Boat Categories"
msgstr ""
#: .\cvkbrno\models.py:50
msgid "Club"
msgstr ""
#: .\cvkbrno\models.py:51
msgid "Hours Worked"
msgstr ""
#: .\cvkbrno\models.py:63
msgid "boat"
msgstr ""
#: .\cvkbrno\models.py:64
msgid "boats"
msgstr ""
#: .\cvkbrno\models.py:66
msgid "Boat Name"
msgstr ""
#: .\cvkbrno\models.py:67
msgid "Boat Code"
msgstr ""
#: .\cvkbrno\models.py:69
msgid "Nr of Seats"
msgstr ""
#: .\cvkbrno\models.py:71
msgid "water"
msgstr ""
#: .\cvkbrno\models.py:72
msgid "hangar"
msgstr ""
#: .\cvkbrno\models.py:73 .\cvkbrno\views.py:661
msgid "damaged"
msgstr ""
#: .\cvkbrno\models.py:74
msgid "races"
msgstr ""
#: .\cvkbrno\models.py:94 .\cvkbrno\models.py:95
msgid "member work"
msgstr ""
#: .\cvkbrno\models.py:97
msgid "Date"
msgstr ""
#: .\cvkbrno\models.py:98
msgid "Hours"
msgstr ""
#: .\cvkbrno\models.py:99
msgid "Work Event Name"
msgstr ""
#: .\cvkbrno\models.py:102
msgid "planned"
msgstr ""
#: .\cvkbrno\models.py:103
msgid "executed"
msgstr ""
#: .\cvkbrno\models.py:111
msgid "outing"
msgstr ""
#: .\cvkbrno\models.py:112
msgid "outings"
msgstr ""
#: .\cvkbrno\models.py:115
msgid "Start Date/Time"
msgstr ""
#: .\cvkbrno\models.py:116
msgid "End Date/Time"
msgstr ""
#: .\cvkbrno\models.py:117
msgid "Distance"
msgstr ""
#: .\cvkbrno\models.py:118
msgid "Comment"
msgstr ""
#: .\cvkbrno\models.py:120
msgid "reservation"
msgstr ""
#: .\cvkbrno\models.py:121
msgid "active"
msgstr ""
#: .\cvkbrno\models.py:122
msgid "completed"
msgstr ""
#: .\cvkbrno\models.py:123
msgid "race"
msgstr ""
#: .\cvkbrno\models.py:127
msgid "Status"
msgstr ""
#: .\cvkbrno\templates\cvkbrnobase.html:29
msgid "Welcome,"
msgstr ""
#: .\cvkbrno\templates\cvkbrnobase.html:33
msgid "Password Change"
msgstr ""
#: .\cvkbrno\templates\cvkbrnobase.html:45
msgid "Members Work"
msgstr ""
#: .\cvkbrno\templates\cvkbrnobase.html:59
msgid "Go Rowing"
msgstr ""
#: .\cvkbrno\templates\cvkbrnobase.html:69
msgid "Reservations"
msgstr ""
#: .\cvkbrno\templates\cvkbrnobase.html:78
msgid "Boats"
msgstr ""
#: .\cvkbrno\templates\cvkbrnobase.html:86
msgid "Members"
msgstr ""
#: .\cvkbrno\templates\cvkbrnobase.html:94
msgid "Transport"
msgstr ""
#: .\cvkbrno\templates\cvkbrnobase.html:102
msgid "Categories"
msgstr ""
#: .\cvkbrno\templates\cvkbrnobase.html:109
msgid "logout"
msgstr ""
#: .\cvkbrno\views.py:245
msgid "boat deleted"
msgstr ""
#: .\cvkbrno\views.py:259
msgid "member deleted"
msgstr ""
#: .\cvkbrno\views.py:273
msgid "category deleted"
msgstr ""
#: .\cvkbrno\views.py:304 .\cvkbrno\views.py:398 .\cvkbrno\views.py:445
#: .\cvkbrno\views.py:493
msgid "invalid form"
msgstr ""
#: .\cvkbrno\views.py:537 .\cvkbrno\views.py:543 .\cvkbrno\views.py:921
msgid "Changes saved"
msgstr ""
#: .\cvkbrno\views.py:643
msgid "You have no active outings. Go rowing first."
msgstr ""
#: .\cvkbrno\views.py:649
msgid "You are not out. Go rowing first."
msgstr ""
#: .\cvkbrno\views.py:714
msgid "Conflicting reservations exist"
msgstr ""
#: .\cvkbrno\views.py:731
msgid "Invalid Form"
msgstr ""
#: .\cvkbrno\views.py:747
msgid "Make a reservation"
msgstr ""
#: .\cvkbrno\views.py:773 .\cvkbrno\views.py:814
msgid "There is already a boat with that code"
msgstr ""
#: .\cvkbrno\views.py:823
msgid "Changes Saved"
msgstr ""
#: .\cvkbrno\views.py:848
msgid "The two passwords are not equal"
msgstr ""
#: .\cvkbrno\views.py:855
msgid "There is already a user with that username"
msgstr ""
#: .\cvkbrno\views.py:880
msgid "New Member Created"
msgstr ""

View File

@@ -1,263 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-19 08:27+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: .\cvkbrno\models.py:16
msgid "Boat Category"
msgstr "Kategorie Lodí"
#: .\cvkbrno\models.py:19
msgid "boat category"
msgstr "kategorie lodí"
#: .\cvkbrno\models.py:20
msgid "boat categories"
msgstr "kategorie lodí"
#: .\cvkbrno\models.py:34
msgid "coach"
msgstr "trenér"
#: .\cvkbrno\models.py:35 .\cvkbrno\models.py:40
msgid "member"
msgstr "clen"
#: .\cvkbrno\models.py:36
msgid "administrator"
msgstr "správce"
#: .\cvkbrno\models.py:41
msgid "members"
msgstr "clenové"
#: .\cvkbrno\models.py:49
msgid "Boat Categories"
msgstr "Kategorie Lodí"
#: .\cvkbrno\models.py:50
msgid "Club"
msgstr "Klub"
#: .\cvkbrno\models.py:51
msgid "Hours Worked"
msgstr "Odpracované hodiny"
#: .\cvkbrno\models.py:63
msgid "boat"
msgstr "lod"
#: .\cvkbrno\models.py:64
msgid "boats"
msgstr "lode"
#: .\cvkbrno\models.py:66
msgid "Boat Name"
msgstr "název lodi"
#: .\cvkbrno\models.py:67
msgid "Boat Code"
msgstr "Kód Lode"
#: .\cvkbrno\models.py:69
msgid "Nr of Seats"
msgstr "Pocet míst"
#: .\cvkbrno\models.py:71
msgid "water"
msgstr "na vode"
#: .\cvkbrno\models.py:72
msgid "hangar"
msgstr "v hangaru"
#: .\cvkbrno\models.py:73 .\cvkbrno\views.py:656
msgid "damaged"
msgstr "poškozená"
#: .\cvkbrno\models.py:74
msgid "races"
msgstr "na závodech"
#: .\cvkbrno\models.py:94 .\cvkbrno\models.py:95
msgid "member work"
msgstr "brigády"
#: .\cvkbrno\models.py:97
msgid "Date"
msgstr "Datum"
#: .\cvkbrno\models.py:98
msgid "Hours"
msgstr "Hodiny"
#: .\cvkbrno\models.py:99
msgid "Work Event Name"
msgstr "Název Brigády"
#: .\cvkbrno\models.py:102
msgid "planned"
msgstr "plánovaná"
#: .\cvkbrno\models.py:103
msgid "executed"
msgstr "hotová"
#: .\cvkbrno\models.py:111
msgid "outing"
msgstr "výjezd"
#: .\cvkbrno\models.py:112
msgid "outings"
msgstr "výjezdy"
#: .\cvkbrno\models.py:115
msgid "Start Date/Time"
msgstr "Startovní Datum/Cas"
#: .\cvkbrno\models.py:116
msgid "End Date/Time"
msgstr "Datum/Cas ukoncení"
#: .\cvkbrno\models.py:117
msgid "Distance"
msgstr "Vzdálenost"
#: .\cvkbrno\models.py:118
msgid "Comment"
msgstr "Komentár"
#: .\cvkbrno\models.py:120
msgid "reservation"
msgstr "rezervace"
#: .\cvkbrno\models.py:121
msgid "active"
msgstr "aktivní"
#: .\cvkbrno\models.py:122
msgid "completed"
msgstr "dokoncený"
#: .\cvkbrno\models.py:123
msgid "race"
msgstr "závod"
#: .\cvkbrno\models.py:127
msgid "Status"
msgstr "Status"
#: .\cvkbrno\templates\cvkbrnobase.html:26
msgid "Welcome,"
msgstr "Vítej,"
#: .\cvkbrno\templates\cvkbrnobase.html:30
msgid "Password Change"
msgstr "Zmenit Heslo"
#: .\cvkbrno\templates\cvkbrnobase.html:42
msgid "Members Work"
msgstr "Brigády"
#: .\cvkbrno\templates\cvkbrnobase.html:56
msgid "Go Rowing"
msgstr "Jdi na vodu"
#: .\cvkbrno\templates\cvkbrnobase.html:66
msgid "Reservations"
msgstr "Rezervace"
#: .\cvkbrno\templates\cvkbrnobase.html:75
msgid "Boats"
msgstr "Lode"
#: .\cvkbrno\templates\cvkbrnobase.html:83
msgid "Members"
msgstr "Clenové"
#: .\cvkbrno\templates\cvkbrnobase.html:91
msgid "Transport"
msgstr "Doprava"
#: .\cvkbrno\templates\cvkbrnobase.html:99
msgid "Categories"
msgstr "Kategorie"
#: .\cvkbrno\templates\cvkbrnobase.html:106
msgid "logout"
msgstr "odhlásit"
#: .\cvkbrno\views.py:240
msgid "boat deleted"
msgstr "lod smazána"
#: .\cvkbrno\views.py:254
msgid "member deleted"
msgstr "clen smazán"
#: .\cvkbrno\views.py:268
msgid "category deleted"
msgstr "kategorie smazána"
#: .\cvkbrno\views.py:299 .\cvkbrno\views.py:393 .\cvkbrno\views.py:440
#: .\cvkbrno\views.py:488
msgid "invalid form"
msgstr "neplatný formulár"
#: .\cvkbrno\views.py:532 .\cvkbrno\views.py:538 .\cvkbrno\views.py:916
msgid "Changes saved"
msgstr "Zmeny uloženy"
#: .\cvkbrno\views.py:638
msgid "You have no active outings. Go rowing first."
msgstr "Nemáte žádné aktivní výjezdy. Jdete nejdríve na vodu."
#: .\cvkbrno\views.py:644
msgid "You are not out. Go rowing first."
msgstr "Nejste na vode. Jdete nejdríve na vodu."
#: .\cvkbrno\views.py:709
msgid "Conflicting reservations exist"
msgstr "Konflikt rezervací"
#: .\cvkbrno\views.py:726
msgid "Invalid Form"
msgstr "Neplatný Formulár"
#: .\cvkbrno\views.py:742
msgid "Make a reservation"
msgstr "Rezervujte"
#: .\cvkbrno\views.py:768 .\cvkbrno\views.py:809
msgid "There is already a boat with that code"
msgstr "Již existuje jiná lod s tímto kódem."
#: .\cvkbrno\views.py:818
msgid "Changes Saved"
msgstr "Zmeny Uloženy"
#: .\cvkbrno\views.py:843
msgid "The two passwords are not equal"
msgstr "Nazadal jste stejná hesla."
#: .\cvkbrno\views.py:850
msgid "There is already a user with that username"
msgstr "Uživatel s tímto uživatelském jménem již existuje"
#: .\cvkbrno\views.py:875
msgid "New Member Created"
msgstr "Nový clen vytvoren"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,31 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Create Boat" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Create Boat" %}</h1>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input type="submit" value="Save">
</div>
</form>
</div>
{% endblock %}

View File

@@ -1,25 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% "Delete Boat" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
<div class="grid_2 suffix_4 alpha">
<p class="deletelink">
<a href="/cvkbrno/boats/{{ id }}/delete">
{% trans "Confirm Delete" %}</a>
</p>
</div>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
</div>
{% endblock %}

View File

@@ -1,66 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Edit Boat" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
<div class="grid_2 suffix_4 alpha">
<p>
<a class="button red small" href="/cvkbrno/boats/{{ id }}/deleteconfirm">
{% trans "Delete" %}</a>
</p>
</div>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Edit Boat" %}</h1>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input class="button green" type="submit" value="{% trans 'Save' %}">
</div>
</form>
</div>
<div id="outings" class="grid_6 omega">
<h1>{% trans "Recent Outings with this boat" %}</h1>
<div class="grid_2 suffix_4 alpha">
<p>
&nbsp;
</p>
</div>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Date" %}</th>
<th>{% trans "Rower" %}</th>
<th>{% trans "Status" %}</th>
</tr>
</thead>
<tbody>
{% for outing in theoutings %}
<tr>
<td>{{ outing.starttime }}</td>
<td>{{ outing.rower.user.first_name }} {{ outing.rower.user.last_name }}</td>
<td>{% trans outing.status %}</td>
</tr>
{% endfor %}
<tbody>
</table>
</div>
{% endblock %}

View File

@@ -1,80 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Boats Admin" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Boats Admin" %}</h1>
<div id="addboat" class="grid_2 suffix_4 alpha">
<p>
<a class="button green small" href="/cvkbrno/boats/add">{% trans "Add Boat" %}</a>
</p>
</div>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Code" %}</th>
<th>{% trans "Name" %}</th>
<th>{% trans "Status" %}</th>
<th>{% trans "Edit" %}</th>
</tr>
</thead>
<tbody>
{% for boat in theboats %}
<tr>
<td>{{ boat.boatcode }}</td>
<td>{{ boat.boatname }}</td>
<td>{% trans boat.status %}</td>
<td><a href="/cvkbrno/boats/{{ boat.id }}/edit">E</a></td>
</tr>
{% endfor %}
<tbody>
</table>
{% csrf_token %}
</div>
<div id="outings" class="grid_6 omega">
<h1>{% trans "Recent Outings" %}</h1>
<div class="grid_2 suffix_4 alpha">
<p>
&nbsp;
</p>
</div>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Date" %}</th>
<th>{% trans "Name" %}</th>
<th>{% trans "Rower" %}</th>
<th>{% trans "Status" %}</th>
</tr>
</thead>
<tbody>
{% for outing in theoutings %}
<tr>
<td>{{ outing.starttime }}</td>
<td>{{ outing.boat.boatname }}</td>
<td>{{ outing.rower.user.first_name }} {{ outing.rower.user.last_name }}</td>
<td>{% trans outing.status %}</td>
</tr>
{% endfor %}
<tbody>
</table>
</div>
{% endblock %}

View File

@@ -1,45 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Boat Category Admin" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Boat Category Admin" %}</h1>
<div id="addcategory" class="grid_2 suffix_4 alpha">
<p class="greenbar">
<a href="/cvkbrno/categories/add">{% trans "Add Boat Category" %}</a>
</p>
</div>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Edit" %}</th>
</tr>
</thead>
<tbody>
{% for category in thecats %}
<tr>
<td>{{ category.name }}</td>
<td><a href="/cvkbrno/categories/{{ category.id }}/edit">E</a></td>
</tr>
{% endfor %}
<tbody>
</table>
{% csrf_token %}
</div>
{% endblock %}

View File

@@ -1,24 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Delete Boat Category" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
<div class="grid_2 suffix_4 alpha">
<p class="deletelink">
<a href="/cvkbrno/categories/{{ id }}/delete">{% trans "Confirm Delete" %}</a>
</p>
</div>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
</div>
{% endblock %}

View File

@@ -1,37 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Edit Category" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
<div class="grid_2 suffix_4 alpha">
<p class="deletelink">
<a href="/cvkbrno/categories/{{ id }}/deleteconfirm">
{% trans "Delete" %}</a>
</p>
</div>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Edit Category" %}</h1>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input type="submit" value="{% trans 'Save' %}">
</div>
</form>
</div>
{% endblock %}

View File

@@ -1,31 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Create Category" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Create Category" %}</h1>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input type="submit" value="Save">
</div>
</form>
</div>
{% endblock %}

View File

@@ -1,81 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% block content %}
<div class="grid_12 alpha">
{% if form.errors %}
<p>{% trans "Your username and password didn't match. Please try again." %}</p>
{% endif %}
<form method="post" action="">
{% csrf_token %}
{% if next %}
<input type="hidden" name="next" value="{{ next }}" />
{% endif %}
<table align="center">
<tr><th>
<label class="control-label" for="username">{% trans "Username" %}</label>
</th>
<td>
<input type="text" id="username" name="username" placeholder="Username">
</td></tr>
<tr><th>
<label class="control-label" for="password">
{% trans "Password" %}</label>
</th>
<td>
<input type="password" name="password" id="password" placeholder="Password">
</td></tr>
<tr>
<td>&nbsp;</p>
<td>
<button type="submit" class="btn">{% trans "Login" %}</button>
</td></tr>
</table>
</form>
</div>
<div class="grid_6 alpha">
<h1>{% trans "Boats Out" %}</h1>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Boat" %}</th>
<th>{% trans "Departure time" %}</th>
</tr>
</thead>
<tbody>
{% for outing in activeoutings %}
<tr>
<td> {{ outing.boat.boatname }} </td>
<td> {{ outing.starttime }} </td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="grid_6 omega">
<h1>{% trans "Reservations" %}</h1>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Boat" %}</th>
<th>{% trans "Departure time" %}</th>
<th>{% trans "Reserved by" %}</th>
</tr>
</thead>
<tbody>
{% for res in reservations %}
<tr>
<td> {{ res.boat.boatname }} </td>
<td> {{ res.starttime }} </td>
<td> {{ res.rower.user.first_name }} {{ res.rower.user.last_name }} </td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

View File

@@ -1,33 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Create Member" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Create Member" %}</h1>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form1.as_table }}
{{ form2.as_table }}
{{ form3.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input type="submit" value="{% trans 'Save' %}">
</div>
</form>
</div>
{% endblock %}

View File

@@ -1,38 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Edit Member" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
<div class="grid_2 suffix_4 alpha">
<p>
<a class="button small red" href="/cvkbrno/members/{{ id }}/deleteconfirm">
{% trans "Delete" %}</a>
</p>
</div>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Edit Member" %}</h1>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form1.as_table }}
{{ form2.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input type="submit" value="{% trans 'Save' %}">
</div>
</form>
</div>
{% endblock %}

View File

@@ -1,53 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Members Admin" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Members Admin" %}</h1>
<div id="addboat" class="grid_2 suffix_4 alpha">
<p class="greenbar">
<a href="/cvkbrno/members/add">{% trans "Add Member" %}</a>
</p>
</div>
{% if themembers %}
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Last Name" %}</th>
<th>{% trans "First Name" %}</th>
<th>{% trans "Contributions" %}</th>
<th>{% trans "Edit" %}</th>
</tr>
</thead>
<tbody>
{% for member in themembers %}
<tr>
<td>{{ member.user.last_name }}</td>
<td>{{ member.user.first_name }}</td>
<td>{{ member.contributions }}</td>
<td><a href="/cvkbrno/members/{{ member.id }}/edit">E</a></td>
</tr>
{% endfor %}
<tbody>
</table>
{% endif %}
{% csrf_token %}
</div>
{% endblock %}

View File

@@ -1,24 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Delete Member" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
<div class="grid_2 suffix_4 alpha">
<p class="deletelink">
<a href="/cvkbrno/members/{{ id }}/delete">{% trans "Confirm Delete" %}</a>
</p>
</div>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
</div>
{% endblock %}

View File

@@ -1,53 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Members Admin" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Members Admin" %}</h1>
<div id="addboat" class="grid_2 suffix_4 alpha">
<p>
<a class="button green small" href="/cvkbrno/members/add">{% trans "Add Member" %}</a>
</p>
</div>
{% if themembers %}
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Last Name" %}</th>
<th>{% trans "First Name" %}</th>
<th>{% trans "Contributions" %}</th>
<th>{% trans "Edit" %}</th>
</tr>
</thead>
<tbody>
{% for member in themembers %}
<tr>
<td>{{ member.user.last_name }}</td>
<td>{{ member.user.first_name }}</td>
<td>{{ member.contributions }}</td>
<td><a href="/cvkbrno/members/{{ member.id }}/edit">E</a></td>
</tr>
{% endfor %}
<tbody>
</table>
{% endif %}
{% csrf_token %}
</div>
{% endblock %}

View File

@@ -1,66 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Edit Member Work" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
<div class="grid_2 suffix_4 alpha">
<p>
<a class="button red small" href="/cvkbrno/boats/{{ id }}/deleteconfirm">
{% trans "Delete" %}</a>
</p>
</div>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Edit Boat" %}</h1>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input class="button green" type="submit" value="{% trans 'Save' %}">
</div>
</form>
</div>
<div id="outings" class="grid_6 omega">
<h1>{% trans "Recent Outings with this boat" %}</h1>
<div class="grid_2 suffix_4 alpha">
<p>
&nbsp;
</p>
</div>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Date" %}</th>
<th>{% trans "Rower" %}</th>
<th>{% trans "Status" %}</th>
</tr>
</thead>
<tbody>
{% for outing in theoutings %}
<tr>
<td>{{ outing.starttime }}</td>
<td>{{ outing.rower.user.first_name }} {{ outing.rower.user.last_name }}</td>
<td><a href="/cvkbrno/outing/{{ outing.id }}">{% trans outing.status %}</a></td>
</tr>
{% endfor %}
<tbody>
</table>
</div>
{% endblock %}

View File

@@ -1,50 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Meterboard" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Meterboard" %}</h1>
{{ data|safe }}
{% csrf_token %}
</div>
<div id="outings" class="grid_6 omega">
<h1>{% trans "Recent Outings" %}</h1>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Date" %}</th>
<th>{% trans "Name" %}</th>
<th>{% trans "Rower" %}</th>
<th>{% trans "Status" %}</th>
</tr>
</thead>
<tbody>
{% for outing in theoutings %}
<tr>
<td>{{ outing.starttime }}</td>
<td>{{ outing.boat.boatname }}</td>
<td>{{ outing.rower.user.first_name }} {{ outing.rower.user.last_name }}</td>
<td><a href="/cvkbrno/outing/{{ outing.id }}">{% trans outing.status %}</a></td>
</tr>
{% endfor %}
<tbody>
</table>
</div>
{% endblock %}

View File

@@ -1,66 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "View Outing" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
<div class="grid_2 suffix_4 alpha">
<p>
<a class="button red small" href="/cvkbrno/boats/{{ id }}/deleteconfirm">
{% trans "Delete" %}</a>
</p>
</div>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Edit Boat" %}</h1>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input class="button green" type="submit" value="{% trans 'Save' %}">
</div>
</form>
</div>
<div id="outings" class="grid_6 omega">
<h1>{% trans "Recent Outings with this boat" %}</h1>
<div class="grid_2 suffix_4 alpha">
<p>
&nbsp;
</p>
</div>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Date" %}</th>
<th>{% trans "Rower" %}</th>
<th>{% trans "Status" %}</th>
</tr>
</thead>
<tbody>
{% for outing in theoutings %}
<tr>
<td>{{ outing.starttime }}</td>
<td>{{ outing.rower.user.first_name }} {{ outing.rower.user.last_name }}</td>
<td><a href="/cvkbrno/outing/{{ outing.id }}">{% trans outing.status %}</a></td>
</tr>
{% endfor %}
<tbody>
</table>
</div>
{% endblock %}

View File

@@ -1,40 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Return from outing" %}
{% endblock %}
{% block content %}
<div id="workouts" class="grid_12 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Return from outing" %}</h1>
<h2>{{ outing.boat.boatcode }} {{ outing.boat.boatname }}</h2>
<p>{% trans "Please check the boat" %}</p>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
<tr>
<th><label for="id_damagecheck">{% trans "Is boat OK?" %}</label></th>
<td><select id="id_damagecheck" name="damagecheck">
<option value="Yes" selected="selected">{% trans 'Yes' %}</option>
<option value="No">{% trans 'No' %}</option>
</select></td>
</tr>
{{ form.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input type="submit" value="{% trans 'Save' %}">
</div>
</form>
</div>
{% endblock %}

View File

@@ -1,182 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% load tz %}
{% block title %}{% trans "Going Rowing" %} {% endblock %}
{% block content %}
{% localtime on %}
<script type="text/JavaScript">
var themembers = {{ jsonmembers|safe }};
function getformfields(nrseat) {
var s = "<table>"
for (i=2;i<=nrseat;i++) {
s+='<tr><td>'
s+=i
s+=': </td><td><select id="idcrew'
s+=i
s+='" name="crew'
s+=i
s+='"><option disabled selected value> -- </option>'
for (var id in themembers) {
s+= "<option value="
s+= id
s+= ">"+themembers[id]+"</option>"
}
s+= '</select></td></tr>'
}
s+= "</table>"
return s
}
</script>
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Going Rowing" %}</h1>
<form enctype="multipart/form-data" action="" method="post" content="text/html;charset=UTF-8">
<table width=100%>
{{ form.as_table }}
<tr><th><label for="id_boat">{% trans "Boat" %}:</label></th>
<td><select id="id_boat" name="boat"
onchange="document.getElementById('crew').innerHTML =
getformfields(this.options[this.selectedIndex].getAttribute('data-nrseat'));"
onload="document.getElementById('crew').innerHTML =
getformfields(this.options[this.selectedIndex].getAttribute('data-nrseat'));">
{% if selectedboat %}
<option value="{{ selectedboat.id }}" data-nrseat="{{ selectedboat.nrseats }}" selected="selected">
{{ selectedboat.boatcode }} {{ selectedboat.boatname }}
({{ selectedboat.nrseats }})</option>
{% else %}
<option value="" selected="selected">---------</option>
{% endif %}
{% for boat in theboats %}
<option value="{{ boat.id }}" data-nrseat="{{ boat.nrseats }}">{{ boat.boatcode }} {{ boat.boatname }} ({{ boat.nrseats }})</option>
{% endfor %}
</select></td></tr>
</table>
<p>&nbsp;</p>
<p>1: {{ user.first_name }} {{ user.last_name }}</p>
<p id="crew"></p>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input class="button green" type="submit" value="{% trans 'Save' %}">
</div>
</form>
</div>
<div id="reservations" class="grid_6 omega">
<h1>{% trans "Reservations" %}</h1>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Boat" %}</th>
<th>{% trans "Departure time" %}</th>
<th>{% trans "Reserved by" %}</th>
<th>{% trans "Delete" %}
</tr>
</thead>
<tbody>
{% for outing in reservations %}
<tr>
<td> {{ outing.boat.boatname }} </td>
<td> {{ outing.starttime }} </td>
<td> {{ outing.rower.user.first_name }} {{ outing.rower.user.last_name }} </td>
{% if user == outing.rower.user or thisclub_admin %}
<td><a href="/cvkbrno/outing/{{ outing.id }}/delete">D</a></td>
{% else %}
<td>&nbsp;</td<
{% endif %}
<td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div id="damaged" class="grid_6 omega">
{% if damagedboats %}
<h1>{% trans "Temporarily Unavailable" %}</h1>
<table class="listtable" width=100%>
<tbody>
{% for boat in damagedboats %}
<tr>
<td> {{ boat.boatname }} </td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if races %}
<h1>{% trans "Upcoming Races" %}</h1>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Start Date" %}</th>
<th>{% trans "End Date" %}</th>
</tr>
</thead>
<tbody>
{% for race in races %}
<tr>
<td>{{ race.name }}</td>
<td>{{ race.startdatetime }}</td>
<td>{{ race.enddatetime }}</td>
</tr>
{% endfor %}
<tbody>
</table>
{% endif %}
</div>
<div id="plannedwork" class="grid_6 omega">
{% if plannedwork %}
<h1>{% trans "Upcoming Members Work" %}</h1>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Date" %}</th>
<th>{% trans "Action" %}</th>
</tr>
</thead>
<tbody>
{% for w in plannedwork %}
<tr>
<td>{{ w.name }}</td>
<td>{{ w.date }}</td>
{% if member in w.worker.all %}
<td><a class="button red small" href="/cvkbrno/memberswork/{{ w.id }}/removeme">{% trans "Remove me" %}</a></td>
{% else %}
<td><a class="button green small" href="/cvkbrno/memberswork/{{ w.id }}/addme">{% trans "Add me" %}</a></td>
{% endif %}
</tr>
{% endfor %}
<tbody>
</table>
{% endif %}
</div>
{% endlocaltime %}
{% endblock %}

View File

@@ -1,31 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Create Races Event" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Create Races Event" %}</h1>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form.as_table }}
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input type="submit" value="Save">
</div>
</form>
</div>
{% endblock %}

View File

@@ -1,45 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Races Admin" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Races Admin" %}</h1>
<div id="addcategory" class="grid_2 suffix_4 alpha">
<p>
<a class="button small green" href="/cvkbrno/transport/add">{% trans "Add Race Event" %}</a>
</p>
</div>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Edit" %}</th>
</tr>
</thead>
<tbody>
{% for race in races %}
<tr>
<td>{{ race.name }}</td>
<td><a href="/cvkbrno/transport/{{ race.id }}/edit">E</a></td>
</tr>
{% endfor %}
<tbody>
</table>
{% csrf_token %}
</div>
{% endblock %}

View File

@@ -1,74 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load i18n %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}{% trans "Make a Reservation" %}{% endblock %}
{% block content %}
<div id="workouts" class="grid_6 alpha">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<h1>{% trans "Make a reservation" %}</h1>
<form enctype="multipart/form-data" action="" method="post">
<table width=100%>
{{ form.as_table }}
<tr><th><label for="id_boat">{% trans "Boat:" %}</label></th>
<td><select id="id_boat" name="boat">
<option value="" selected="selected">---------</option>
{% for boat in theboats %}
<option value="{{ boat.id }}">{{boat.boatcode}} {{ boat.boatname }}</option>
{% endfor %}
</select></td>
</tr>
</table>
{% csrf_token %}
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
<input class="button green" type="submit" value="{% trans 'Save' %}">
</div>
</form>
</div>
<div id="reservations" class="grid_6 omega">
<h1>{% trans "Reservations" %}</h1>
<table class="listtable" width=100%>
<thead>
<tr>
<th>{% trans "Boat" %}</th>
<th>{% trans "Date" %}</th>
<th>{% trans "Departure time" %}</th>
<th>{% trans "Return time" %}</th>
<th>{% trans "Reserved by" %}</th>
<th>{% trans "Delete" %}</th>
</tr>
</thead>
<tbody>
{% for outing in reservations %}
<tr>
<td> {{ outing.boat.boatname }} </td>
<td> {{ outing.starttime |date:'d/m/y ' }} &nbsp;</td>
<td> {{ outing.starttime |time:'H:i ' }} &nbsp;</td>
<td> {{ outing.endtime |time:'H:i '}} &nbsp;</td>
<td> {{ outing.rower.user.first_name }} {{ outing.rower.user.last_name }} </td>
{% if user == outing.rower.user or thisclub_admin %}
<td><a href="/cvkbrno/outing/{{ outing.id }}/delete">D</a></td>
{% else %}
<td>&nbsp;</td<
{% endif %}
<td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

View File

@@ -1,24 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Jdu na vodu {% endblock %}
{% block content %}
{% load i18n %}
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}" />
<select name="language">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
<input type="submit" value="Go" />
</form>
{% endblock %}

View File

@@ -1,193 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
{% load i18n %}
{% load tz %}
{% get_current_language as LANGUAGE_CODE %}
{% language LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
<link rel="shortcut icon" href="/static/img/myicon.png" />
<link rel="shortcut icon" href="/static/img/favicon.ico" />
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=0.67">
<title>CVK Brno</title>
<link rel="stylesheet" href="/static/css/reset.css" />
<link rel="stylesheet" href="/static/css/text.css" />
<link rel="stylesheet" href="/static/css/960_12_col.css" />
<link rel="stylesheet" href="/static/css/rowsandall.css" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
{% block meta %} {% endblock %}
</head>
<body>
<div class="container_12">
<div id="logo" class="grid_2">
<p><a href="/cvkbrno"><img src="/static/img/cvkbrnologo.gif"
alt="Rowsandall logo" width="160" heigt="160"></a></p>
</div>
<div class="grid_10 omega">
<div class="grid_5 alpha">
<h2>{% trans "Welcome," %} {{ user.first_name }}</h2>
</div>
<div class="grid_1">
<a href="/cvkbrno/language/cs/">
<img src="/static/flags_iso/24/cz.png" alt="CZ flag">
</a>
</div>
<div class="grid_1">
<a href="/cvkbrno/language/en-GB/">
<img src="/static/flags_iso/24/gb.png" alt="EN flag">
</a>
</div>
<div class="grid_1">
<a href="/cvkbrno/language/nl/">
<img src="/static/flags_iso/24/nl.png" alt="NL flag">
</a>
</div>
<div class="grid_2 omega">
{% if user.is_authenticated %}
<p><a class="button gray" href="/password_change/">
{% trans "Password Change" %}</a></p>
{% else %}
<p><a class="button gray small" href="/password_reset/">{% trans "Forgotten Password?" %}</a></p>
{% endif %}
</div>
</div>
<div class="grid_10">
<div class="grid_2 alpha">
<p>{% trans "Worked hours" %}: {{ worked_hours }}
</p>
</div>
<div class="grid_2">
{% if user.is_authenticated %}
<p>
<a class="button blue small" href="/cvkbrno/meterboard">
{% trans "Meterboard" %}
</a>
</p>
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
<div class="grid_2 prefix_3">
{% if thisclub_admin %}
<p>
<a class="button rosy small" href="/cvkbrno/memberswork">
{% trans "Members Work" %}</a>
</p>
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
</div>
<div class="grid_10" omega>
<div class="grid_2 alpha">
{% if user.is_authenticated %}
<p>
<a class="button blue" href="/cvkbrno/createouting">
{% trans "Go Rowing" %}</a>
</p>
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
<div class="grid_2">
{% if user.is_authenticated %}
<p>
<a class="button blue" href="/cvkbrno/makereservation">
{% trans "Reservations" %}</a>
</p>
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
<div class="grid_1">
{% if thisclub_admin %}
<p><a class="button rosy" href="/cvkbrno/boats">
{% trans "Boats" %}</a></p>
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
<div class="grid_1">
{% if thisclub_admin %}
<p><a class="button rosy" href="/cvkbrno/members">
{% trans "Members" %}</a></p>
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
<div class="grid_1">
{% if thisclub_admin %}
<p><a class="button rosy" href="/cvkbrno/transport">
{% trans "Transport" %}</a></p>
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
<div class="grid_2">
{% if thisclub_admin %}
<p><a class="button rosy" href="/cvkbrno/categories">
{% trans "Categories" %}</a></p>
{% else %}
<p>&nbsp;</p>
{% endif %}
</div>
<div class="grid_1 omega">
{% if user.is_authenticated %}
<p><a class="button blue" href="/cvkbrno/logout/">{% trans "logout" %}</a></p>
{% else %}
<p>&nbsp</p>
{% endif %}
</div>
</div>
<div class="clear"></div>
<div class="grid_12">
{% block message %}
{% if message %}
<p class="message">
{{ message }}
</p>
{% endif %}
{% if successmessage %}
<p class="successmessage">
{{ successmessage }}
</p>
{% endif %}
{% endblock %}
</div>
<div class="grid_12">
{% timezone "Europe/Paris" %}
{% block content %}{% endblock %}
{% endtimezone %}
</div>
<div class="clear"></div>
<div class="grid_12 omega" >
{% block footer %}
<p id="footer"
>{{ versionstring }}</p>
<div class="grid_3 prefix_1 suffix_1 alpha">
<p id="footer">&copy; Sander Roosendaal</p>
</div>
<div class="grid_2">
<p id="footer">About</p>
</div>
<div class="grid_1 prefix_2 suffix_2 omega">
<p id="footer">Contact</p>
</div>
{% endblock %}
</div>
</div>
<!-- end container -->
</body>
{% endlanguage %}
</html>

View File

@@ -1,53 +0,0 @@
{% extends "cvkbrnobase.html" %}
{% block content %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>
<input type="submit" value="login" />
{% if next %}
<input type="hidden" name="next" value="{{ next }}" />
{% else %}
<input type="hidden" name="next" value="." />
{% endif %}
</form>
<h1>Lod&#283; na vod&#283;</h1>
<table class="listtable" width=100%>
<thead>
<tr>
<th>Boat</th>
<th>Departure time</th>
</tr>
</thead>
<tbody>
{% for outing in activeoutings %}
<tr>
<td> {{ outing.boat.boatname }} </td>
<td> {{ outing.starttime }} </td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

Binary file not shown.

Binary file not shown.

View File

@@ -1,7 +0,0 @@
from django import template
register = template.Library()
@register.filter
def filteriternum(d):
return d+1

Binary file not shown.

View File

@@ -1,3 +0,0 @@
from django.test import TestCase
# Create your tests here.

Binary file not shown.

View File

@@ -1,96 +0,0 @@
from django.conf import settings
from django.conf.urls import url
from . import views
from django.contrib.auth import views as auth_views
from forms import BoatEditForm
urlpatterns = [
# url(r'^login$',auth_views.login,
# {'template_name':'registration/cvkbrno_login.html',
# 'extra_context':{
# 'activeoutings':views.get_active_outings(),
# 'reservations':views.get_future_reservations(),
# },
# }),
url(r'^login/$',views.login_user_view),
url(r'^logout/$',views.logout_then_login),
url(r'^meterboard/$',views.meterboard_view),
url(r'^meterboard$',views.meterboard_view),
url(r'^memberswork/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.members_work_admin_view),
url(r'^memberswork/s/(?P<successmessage>\w+.*)$',views.members_work_admin_view),
url(r'^memberswork/c/(?P<message>\w+.*)$',views.members_work_admin_view),
url(r'^memberswork/add$',views.members_work_add_view),
url(r'^memberswork/(?P<id>\d+)/addme$',views.members_work_addme),
url(r'^memberswork/(?P<id>\d+)/removeme$',views.members_work_removeme),
url(r'^memberswork/$',views.members_work_admin_view),
url(r'^memberswork/(?P<id>\d+)/edit/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.members_work_edit_view),
url(r'^memberswork/(?P<id>\d+)/edit/s/(?P<successmessage>\w+.*)$',views.members_work_edit_view),
url(r'^memberswork/(?P<id>\d+)/edit$',views.members_work_edit_view),
url(r'^memberswork/(?P<id>\d+)/edit/c/(?P<message>\w+.*)$',views.members_work_edit_view),
url(r'^memberswork/add$',views.members_work_add_view),
url(r'^memberswork/(?P<id>\d+)/delete$',views.members_work_delete_view),
url(r'^memberswork/$',views.members_work_admin_view),
url(r'^memberswork/(?P<id>\d+)/complete$',views.members_work_complete_view),
url(r'^createouting/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.createouting_view),
url(r'^createouting/c/(?P<message>\w+.*)$',views.createouting_view),
url(r'^createouting$',views.createouting_view),
url(r'^closeouting/c/(?P<message>\w+.*)$',views.closeouting_view),
url(r'^closeouting$',views.closeouting_view),
url(r'^makereservation/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.makereservation_view),
url(r'^makereservation/c/(?P<message>\w+.*)$',views.makereservation_view),
url(r'^makereservation$',views.makereservation_view),
url(r'^transport/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.transport_view),
url(r'^transport/c/(?P<message>\w+.*)$',views.transport_view),
url(r'^transport/s/(?P<successmessage>\w+.*)$',views.transport_view),
url(r'^transport$',views.transport_view),
url(r'^transport/add$',views.transport_add_view),
url(r'^transport/(?P<id>\d+)/delete$',views.races_admin_delete_view),
# url(r'^c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.base_view),
# url(r'^c/(?P<message>\w+.*)$',views.base_view),
# url(r'^s/(?P<successmessage>\w+.*)$',views.base_view),
url(r'^$',views.base_view),
url(r'^outing/(?P<id>\d+)$',views.outing_admin_view),
url(r'^boats/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.boats_admin_view),
url(r'^boats/(?P<id>\d+)/edit/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.boats_admin_edit_view),
url(r'^boats/(?P<id>\d+)/edit/c/(?P<message>\w+.*)$',views.boats_admin_edit_view),
url(r'^boats/(?P<id>\d+)/edit$',views.boats_admin_edit_view),
url(r'^boats/c/(?P<message>\w+.*)$',views.boats_admin_view),
url(r'^boats/s/(?P<successmessage>\w+.*)$',views.boats_admin_view),
url(r'^boats$',views.boats_admin_view),
url(r'^boats/(\d+)/deleteconfirm$',views.boats_admin_delete_confirm_view),
url(r'^boats/(\d+)/delete$',views.boats_admin_delete_view),
url(r'^boats/add/c/(?P<message>\w+.*)$',views.boats_admin_add_view),
url(r'^boats/add$',views.boats_admin_add_view),
url(r'^categories/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.categories_admin_view),
url(r'^categories/(?P<id>\d+)/edit/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.categories_admin_edit_view),
url(r'^categories/(?P<id>\d+)/edit/c/(?P<message>\w+.*)$',views.categories_admin_edit_view),
url(r'^categories/(?P<id>\d+)/edit$',views.categories_admin_edit_view),
url(r'^categories/c/(?P<message>\w+.*)$',views.categories_admin_view),
url(r'^categories/s/(?P<successmessage>\w+.*)$',views.categories_admin_view),
url(r'^categories$',views.categories_admin_view),
url(r'^categories/(\d+)/deleteconfirm$',views.categories_admin_delete_confirm_view),
url(r'^categories/(\d+)/delete$',views.categories_admin_delete_view),
url(r'^categories/add/c/(?P<message>\w+.*)$',views.categories_admin_add_view),
url(r'^categories/add$',views.categories_admin_add_view),
url(r'^members/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.members_admin_view),
url(r'^members/(?P<id>\d+)/edit/c/(?P<message>\w+.*)/s/(?P<successmessage>\w+.*)$',views.members_admin_edit_view),
url(r'^members/(?P<id>\d+)/edit/c/(?P<message>\w+.*)$',views.members_admin_edit_view),
url(r'^members/(?P<id>\d+)/edit$',views.members_admin_edit_view),
url(r'^members/c/(?P<message>\w+.*)$',views.members_admin_view),
url(r'^members/s/(?P<successmessage>\w+.*)$',views.members_admin_view),
url(r'^members$',views.members_admin_view),
url(r'^members/(\d+)/deleteconfirm$',views.members_admin_delete_confirm_view),
url(r'^members/(\d+)/delete$',views.members_admin_delete_view),
url(r'^members/add/c/(?P<message>\w+.*)$',views.members_admin_add_view),
url(r'^members/add$',views.members_admin_add_view),
url(r'^outing/(\d+)/delete$',views.members_outing_delete_view),
url(r'^language/(?P<languagecode>[A-z]{2})/$',views.change_language_view),
url(r'^language/(?P<languagecode>[A-z]{2}\-[A-z]{2})/$',views.change_language_view),
# url(r'^i18n/', include('django.conf.urls.i18n')),
]

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
#: .\rowsandall_app\settings.py:135
msgid "Czech"
msgstr ""
#: .\rowsandall_app\settings.py:136
msgid "Dutch"
msgstr ""

View File

@@ -1,263 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-19 08:27+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: .\cvkbrno\models.py:16
msgid "Boat Category"
msgstr "Kategorie Lodí"
#: .\cvkbrno\models.py:19
msgid "boat category"
msgstr "kategorie lodí"
#: .\cvkbrno\models.py:20
msgid "boat categories"
msgstr "kategorie lodí"
#: .\cvkbrno\models.py:34
msgid "coach"
msgstr "trenér"
#: .\cvkbrno\models.py:35 .\cvkbrno\models.py:40
msgid "member"
msgstr "clen"
#: .\cvkbrno\models.py:36
msgid "administrator"
msgstr "správce"
#: .\cvkbrno\models.py:41
msgid "members"
msgstr "clenové"
#: .\cvkbrno\models.py:49
msgid "Boat Categories"
msgstr "Kategorie Lodí"
#: .\cvkbrno\models.py:50
msgid "Club"
msgstr "Klub"
#: .\cvkbrno\models.py:51
msgid "Hours Worked"
msgstr "Odpracované hodiny"
#: .\cvkbrno\models.py:63
msgid "boat"
msgstr "lod"
#: .\cvkbrno\models.py:64
msgid "boats"
msgstr "lode"
#: .\cvkbrno\models.py:66
msgid "Boat Name"
msgstr "název lodi"
#: .\cvkbrno\models.py:67
msgid "Boat Code"
msgstr "Kód Lode"
#: .\cvkbrno\models.py:69
msgid "Nr of Seats"
msgstr "Pocet míst"
#: .\cvkbrno\models.py:71
msgid "water"
msgstr "na vode"
#: .\cvkbrno\models.py:72
msgid "hangar"
msgstr "v hangaru"
#: .\cvkbrno\models.py:73 .\cvkbrno\views.py:656
msgid "damaged"
msgstr "poškozená"
#: .\cvkbrno\models.py:74
msgid "races"
msgstr "na závodech"
#: .\cvkbrno\models.py:94 .\cvkbrno\models.py:95
msgid "member work"
msgstr "brigády"
#: .\cvkbrno\models.py:97
msgid "Date"
msgstr "Datum"
#: .\cvkbrno\models.py:98
msgid "Hours"
msgstr "Hodiny"
#: .\cvkbrno\models.py:99
msgid "Work Event Name"
msgstr "Název Brigády"
#: .\cvkbrno\models.py:102
msgid "planned"
msgstr "plánovaná"
#: .\cvkbrno\models.py:103
msgid "executed"
msgstr "hotová"
#: .\cvkbrno\models.py:111
msgid "outing"
msgstr "výjezd"
#: .\cvkbrno\models.py:112
msgid "outings"
msgstr "výjezdy"
#: .\cvkbrno\models.py:115
msgid "Start Date/Time"
msgstr "Startovní Datum/Cas"
#: .\cvkbrno\models.py:116
msgid "End Date/Time"
msgstr "Datum/Cas ukoncení"
#: .\cvkbrno\models.py:117
msgid "Distance"
msgstr "Vzdálenost"
#: .\cvkbrno\models.py:118
msgid "Comment"
msgstr "Komentár"
#: .\cvkbrno\models.py:120
msgid "reservation"
msgstr "rezervace"
#: .\cvkbrno\models.py:121
msgid "active"
msgstr "aktivní"
#: .\cvkbrno\models.py:122
msgid "completed"
msgstr "dokoncený"
#: .\cvkbrno\models.py:123
msgid "race"
msgstr "závod"
#: .\cvkbrno\models.py:127
msgid "Status"
msgstr "Status"
#: .\cvkbrno\templates\cvkbrnobase.html:26
msgid "Welcome,"
msgstr "Vítej,"
#: .\cvkbrno\templates\cvkbrnobase.html:30
msgid "Password Change"
msgstr "Zmenit Heslo"
#: .\cvkbrno\templates\cvkbrnobase.html:42
msgid "Members Work"
msgstr "Brigády"
#: .\cvkbrno\templates\cvkbrnobase.html:56
msgid "Go Rowing"
msgstr "Jdi na vodu"
#: .\cvkbrno\templates\cvkbrnobase.html:66
msgid "Reservations"
msgstr "Rezervace"
#: .\cvkbrno\templates\cvkbrnobase.html:75
msgid "Boats"
msgstr "Lode"
#: .\cvkbrno\templates\cvkbrnobase.html:83
msgid "Members"
msgstr "Clenové"
#: .\cvkbrno\templates\cvkbrnobase.html:91
msgid "Transport"
msgstr "Doprava"
#: .\cvkbrno\templates\cvkbrnobase.html:99
msgid "Categories"
msgstr "Kategorie"
#: .\cvkbrno\templates\cvkbrnobase.html:106
msgid "logout"
msgstr "odhlásit"
#: .\cvkbrno\views.py:240
msgid "boat deleted"
msgstr "lod smazána"
#: .\cvkbrno\views.py:254
msgid "member deleted"
msgstr "clen smazán"
#: .\cvkbrno\views.py:268
msgid "category deleted"
msgstr "kategorie smazána"
#: .\cvkbrno\views.py:299 .\cvkbrno\views.py:393 .\cvkbrno\views.py:440
#: .\cvkbrno\views.py:488
msgid "invalid form"
msgstr "neplatný formulár"
#: .\cvkbrno\views.py:532 .\cvkbrno\views.py:538 .\cvkbrno\views.py:916
msgid "Changes saved"
msgstr "Zmeny uloženy"
#: .\cvkbrno\views.py:638
msgid "You have no active outings. Go rowing first."
msgstr "Nemáte žádné aktivní výjezdy. Jdete nejdríve na vodu."
#: .\cvkbrno\views.py:644
msgid "You are not out. Go rowing first."
msgstr "Nejste na vode. Jdete nejdríve na vodu."
#: .\cvkbrno\views.py:709
msgid "Conflicting reservations exist"
msgstr "Konflikt rezervací"
#: .\cvkbrno\views.py:726
msgid "Invalid Form"
msgstr "Neplatný Formulár"
#: .\cvkbrno\views.py:742
msgid "Make a reservation"
msgstr "Rezervujte"
#: .\cvkbrno\views.py:768 .\cvkbrno\views.py:809
msgid "There is already a boat with that code"
msgstr "Již existuje jiná lod s tímto kódem."
#: .\cvkbrno\views.py:818
msgid "Changes Saved"
msgstr "Zmeny Uloženy"
#: .\cvkbrno\views.py:843
msgid "The two passwords are not equal"
msgstr "Nazadal jste stejná hesla."
#: .\cvkbrno\views.py:850
msgid "There is already a user with that username"
msgstr "Uživatel s tímto uživatelském jménem již existuje"
#: .\cvkbrno\views.py:875
msgid "New Member Created"
msgstr "Nový clen vytvoren"

View File

@@ -1,76 +0,0 @@
# The following code is tested on Django 1.7
import django
import sys
import logging
from django.apps import apps
from django.db.migrations.recorder import MigrationRecorder
if django.get_version() > '1.7':
from django.core.serializers import sort_dependencies
else:
from django.core.management.commands.dumpdata import sort_dependencies
LOG_FORMAT = '%(asctime)s|%(levelname)s|%(message)s'
logging.basicConfig(stream=sys.stdout, level=logging.INFO, format=LOG_FORMAT)
logger = logging.getLogger(__name__)
def copy(model):
table_name = model._meta.db_table
logger.info('Start import %s into new_db' % table_name)
table_objects = model.objects.all()
for t in table_objects:
t.save(using='new_db')
logger.info('Successfuly imported %s into new_db' % table_name)
'''
Please note that the id for many to many objects might be diffrent from source table.
This is because id is not specified in the add method.
'''
def copy_m2m(model, m2m_field):
table_name = m2m_field.rel.through._meta.db_table
field_name = m2m_field.name
to_model = m2m_field.rel.to
pk_name = model._meta.pk.name
child_pk_name = to_model._meta.pk.name
logger.info('Start import %s into new_db' % table_name)
for o in model.objects.all():
pk_value = getattr(o, pk_name)
new_o = model.objects.using('new_db').get(**{pk_name: pk_value})
for child in getattr(o, field_name).all():
child_pk_value = getattr(child, child_pk_name)
new_child = to_model.objects.using('new_db').get(**{child_pk_name: child_pk_value})
getattr(new_o, field_name).add(new_child)
logger.info('Successfuly imported %s into new_db' % table_name)
def run():
logger.info('Start move data into new_db')
app_configs = apps.get_app_configs()
app_list = [(a, None) for a in app_configs]
models = sort_dependencies(app_list)
models_with_m2m = []
for m in models:
copy(m)
if m._meta.many_to_many:
models_with_m2m.append(m)
# Migration model needs to copy separately as it is not in the INSTALLED_APPS
copy(MigrationRecorder.Migration)
# re-create object in ManyToManyField
for m in models_with_m2m:
for field in m._meta.many_to_many:
# data for field that has specific through model should have been copied in earlier steps
if field.rel.through._meta.auto_created:
copy_m2m(m, field)
logger.info('Successfully moved data into new_db')

View File

@@ -1,9 +0,0 @@
{% extends "base.html" %}
{% load staticfiles %}
{% block title %}Here's your plot{% endblock %}
{% block content %}
Waiting for the task to complete.
{% endblock %}

View File

@@ -1,16 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<title>{% block title %}{% endblock %}</title>
{% block meta %} {% endblock %}
</head>
<body>
<h1>My helpful rowing site</h1>
{% block content %}{% endblock %}
{% block footer %}
<hr>
<p>{{ versionstring }}.</p>
<p>Thanks for visiting my site.</p>
{% endblock %}
</body>
</html>

View File

@@ -1,24 +0,0 @@
# contact_form.html
<html>
<head>
<title>Contact us</title>
</head>
<body>
<h1>Contact us</h1>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<form action="" method="post">
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@@ -1 +0,0 @@
<h1>It is now {{ current_date }} </h1>

View File

@@ -1,21 +0,0 @@
{% extends "base.html" %}
{% load staticfiles %}
{% block title %}File loading{% endblock %}
{% block content %}
<h1>File Upload</h1>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
<input type="submit" value="Submit">
{% endblock %}

View File

@@ -1,7 +0,0 @@
{% extends "base.html" %}
{% block title %}Current time{% endblock %}
{% block content %}
<p>It is now {{ current_date }}.</p>
{% endblock %}

View File

@@ -1,10 +0,0 @@
{% extends "base.html" %}
{% load staticfiles %}
{% block title %}Here's your plot{% endblock %}
{% block content %}
<h1> Here's your plot</h1>
<p><image src="{% static imagename %}"/></p>
{% endblock %}

View File

@@ -1,36 +0,0 @@
{% extends "base.html" %}
{% load staticfiles %}
{% block title %}Workouts{% endblock %}
{% block content %}
<h1>My Workouts</h1>
{% if workouts %}
<table width="70%">
<tr>
<td> <strong>Date</strong> </td>
<td> <strong>Time </strong></td>
<td> <strong>Name </strong></td>
<td> <strong>Type </strong></td>
<td> <strong>Distance</strong> </td>
<td> <strong>Duration</strong> </td>
<td> <strong>Edit</strong></td>
</tr>
{% for workout in workouts %}
<tr>
<td> {{ workout.date }} </td>
<td> {{ workout.starttime }} </td>
<td> {{ workout.name }} </td>
<td> {{ workout.workouttype }} </td>
<td> {{ workout.distance }}m</td>
<td> {{ workout.duration }} </td>
<td> <a href="/rowers/workout/{{ workout.id }}/edit">E</td>
</tr>
{% endfor %}
</table>
{% else %}
<p> No workouts found </p>
{% endif %}
{% endblock %}

View File

@@ -1,22 +0,0 @@
<html>
<head>
<title>File selection</title>
</head>
<body>
<h1>Select File</h1>
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
<input type="submit" value="Submit">
</form>
</body>
</html>

View File

@@ -1,19 +0,0 @@
{% extends "base.html" %}
{% block title %}Change Rower {% endblock %}
{% block content %}
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<form enctype="multipart/form-data" action="" method="post">
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
<input type="submit" value="Submit">
{% endblock %}

View File

@@ -1,7 +0,0 @@
{% extends "base.html" %}
{% block title %}Rowingdata Version{% endblock %}
{% block content %}
<p>{{ versionstring }}.</p>
{% endblock %}

View File

@@ -1,11 +0,0 @@
{% extends "base.html" %}
{% load staticfiles %}
{% block title %}Waiting{% endblock %}
{% block meta %}<meta http-equiv="refresh" content="30">{% endblock %}
{% block content %}
<h1>Waiting for your image to be processed</h1>
<p> {{ message }} </p>
<p> Page should refresh automatically (or you can hit reload)</p>
{% endblock %}

View File

@@ -1,19 +0,0 @@
{% extends "base.html" %}
{% block title %}Change Workout {% endblock %}
{% block content %}
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<form enctype="multipart/form-data" action="" method="post">
<table>
{{ form.as_table }}
</table>
{% csrf_token %}
<input type="submit" value="Submit">
{% endblock %}

View File

@@ -1,189 +0,0 @@
alabaster==0.7.7
amqp==1.4.9
anaconda-client==1.4.0
anaconda-navigator==1.1.0
anyjson==0.3.3
argcomplete==1.0.0
astropy==1.1.2
Babel==2.2.0
backports-abc==0.4
backports.ssl-match-hostname==3.4.0.2
beautifulsoup4==4.4.1
billiard==3.3.0.23
bitarray==0.8.1
blaze==0.9.1
bokeh==0.11.1
boto==2.39.0
Bottleneck==1.0.0
cairocffi==0.7.2
cdecimal==2.3
celery==3.1.23
certifi==2016.2.28
cffi==1.5.2
chest==0.2.3
click==6.6
cloudpickle==0.1.1
clyent==1.2.1
colorama==0.3.7
comtypes==1.1.2
conda==4.0.5
conda-build==1.20.0
conda-env==2.4.5
conda-manager==0.3.1
configobj==5.0.6
cryptography==1.3
cycler==0.10.0
Cython==0.23.4
cytoolz==0.7.5
dask==0.8.1
datashape==0.5.1
decorator==4.0.9
dill==0.2.4
Django==1.9.5
django-braces==1.8.1
django-celery==3.1.17
django-cors-headers==1.1.0
django-durationfield==0.5.2
django-modelcluster==1.1
django-oauth-toolkit==0.10.0
django-rq==0.9.0
django-taggit==0.18.1
django-translation-manager==0.3.4
django-treebeard==4.0
djangorestframework==3.3.3
docopt==0.6.2
docutils==0.12
enum34==1.1.2
et-xmlfile==1.0.1
fastcache==1.0.2
filemagic==1.6
Flask==0.10.1
Flask-Cors==2.1.2
Flask-Login==0.3.2
Flask-OpenID==1.2.5
Flask-Uploads==0.2.0
flower==0.9.1
funcsigs==0.4
future==0.15.2
futures==3.0.3
gevent==1.1.0
greenlet==0.4.9
grin==1.2.1
gunicorn==19.4.5
h5py==2.5.0
HeapDict==1.0.0
html5lib==0.9999999
httplib2==0.9.2
idna==2.0
ipaddress==1.0.14
ipykernel==4.3.1
ipython==4.1.2
ipython-genutils==0.1.0
ipywidgets==4.1.1
itsdangerous==0.24
jdcal==1.2
jedi==0.9.0
Jinja2==2.8
jsonschema==2.4.0
jupyter==1.0.0
jupyter-client==4.2.2
jupyter-console==4.1.1
jupyter-core==4.1.0
kombu==3.0.35
libmagic==1.0
llvmlite==0.9.0
locket==0.2.0
lxml==3.6.0
MarkupSafe==0.23
matplotlib==1.5.1
mechanize==0.2.5
menuinst==1.3.2
mistune==0.7.2
mpld3==0.2
mpmath==0.19
multipledispatch==0.4.8
nbconvert==4.1.0
nbformat==4.0.1
networkx==1.11
nltk==3.2
nose==1.3.7
notebook==4.1.0
numba==0.24.0
numexpr==2.5
numpy==1.11.0
oauth2==1.9.0.post1
oauthlib==1.0.3
odo==0.4.2
openpyxl==2.3.2
pandas==0.18.0
partd==0.3.2
path.py==0.0.0
patsy==0.4.0
pep8==1.7.0
pickleshare==0.5
Pillow==3.1.1
ply==3.8
polib==1.0.7
psutil==4.1.0
py==1.4.31
pyasn1==0.1.9
pycosat==0.6.1
pycparser==2.14
pycrypto==2.6.1
pyflakes==1.1.0
Pygments==2.1.1
pymarc==3.1.1
pyOpenSSL==0.15.1
pyparsing==2.0.3
pypi-data==0.1.4
pypilist==0.1.0
pyreadline==2.1
pytest==2.8.5
python-dateutil==2.5.1
python-magic==0.4.11
python-openid==2.2.5
pytz==2016.4
pywin32==220
PyYAML==3.11
pyzmq==15.2.0
QtAwesome==0.3.2
qtconsole==4.2.0
QtPy==1.0
redis==2.10.5
requests==2.9.1
requests-oauthlib==0.6.1
rope==0.9.4
rowingdata==0.80.4
rowingphysics==0.2.4
rq==0.6.0
scikit-image==0.12.3
scikit-learn==0.17.1
scipy==0.17.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.10.0
snowballstemmer==1.2.1
sockjs-tornado==1.0.1
South==1.0.2
sphinx==1.3.5
sphinx-pypi-upload==0.2.1
sphinx-rtd-theme==0.1.9
spyder==2.3.8
SQLAlchemy==1.0.12
statsmodels==0.6.1
sympy==1.0
tables==3.2.2
toolz==0.7.4
tornado==4.2
tqdm==4.4.0
traitlets==4.2.1
unicodecsv==0.14.1
Unidecode==0.4.19
virtualenv==15.0.1
wagtail==1.4.3
Werkzeug==0.11.4
Willow==0.3
xlrd==0.9.4
XlsxWriter==0.8.4
xlwings==0.7.0
xlwt==1.0.0

Binary file not shown.

View File

@@ -1,3 +0,0 @@
from __future__ import absolute_import
from .tasks import app as celery_app

Binary file not shown.

View File

@@ -1,23 +0,0 @@
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from .models import Rower, Workout,GraphImage
# Register your models here.
class RowerInline(admin.StackedInline):
model = Rower
can_delete = False
verbose_name_plural = 'rower'
class UserAdmin(UserAdmin):
inlines = (RowerInline,)
class WorkoutAdmin(admin.ModelAdmin):
list_display = ('date','user','name','workouttype')
admin.site.unregister(User)
admin.site.register(User,UserAdmin)
admin.site.register(Workout,WorkoutAdmin)
admin.site.register(GraphImage)

Binary file not shown.

Binary file not shown.

View File

@@ -1,432 +0,0 @@
# Python
import oauth2 as oauth
import cgi
import requests
import requests.auth
import json
from django.utils import timezone
from datetime import datetime
from datetime import timedelta
# Django
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect, HttpResponse,JsonResponse
from django.conf import settings
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
# Project
# from .models import Profile
from rowingdata import rowingdata
import pandas as pd
import numpy as np
from rowers.models import Rower,Workout
from rowsandall_app.settings import C2_CLIENT_ID, C2_REDIRECT_URI, C2_CLIENT_SECRET
class C2NoTokenError(Exception):
def __init__(self,value):
self.value=value
def __str__(self):
return repr(self.value)
def custom_exception_handler(exc,message):
response = {
"errors": [
{
"code": str(exc),
"detail": message,
}
]
}
res = HttpResponse(message)
res.status_code = 401
res.json = json.dumps(response)
return res
def checkworkoutuser(user,workout):
try:
r = Rower.objects.get(user=user)
return (workout.user == r)
except Rower.DoesNotExist:
return(False)
def makeseconds(t):
seconds = t.hour*3600.+t.minute*60.+t.second+0.1*int(t.microsecond/1.e5)
return seconds
def c2wc(weightclass):
if (weightclass=="lwt"):
res = "L"
else:
res = "H"
return res
def createc2workoutdata_as_splits(w):
filename = w.csvfilename
row = rowingdata(filename)
# resize per minute
df = row.df.groupby(lambda x:x/60).mean()
averagehr = int(df[' HRCur (bpm)'].mean())
maxhr = int(df[' HRCur (bpm)'].max())
# adding diff, trying to see if this is valid
t = 10*df.ix[:,' ElapsedTime (sec)'].diff().values
t[0] = t[1]
d = df.ix[:,' Horizontal (meters)'].diff().values
d[0] = d[1]
p = 10*df.ix[:,' Stroke500mPace (sec/500m)'].values
t = t.astype(int)
d = d.astype(int)
p = p.astype(int)
spm = df[' Cadence (stokes/min)'].astype(int)
spm[0] = spm[1]
hr = df[' HRCur (bpm)'].astype(int)
split_data = []
for i in range(len(t)):
thisrecord = {"time":t[i],"distance":d[i],"stroke_rate":spm[i],
"heart_rate":{
"average:":hr[i]
}
}
split_data.append(thisrecord)
try:
durationstr = datetime.strptime(str(w.duration),"%H:%M:%S.%f")
except ValueError:
durationstr = datetime.strptime(str(w.duration),"%H:%M:%S")
data = {
"type": w.workouttype,
"date": str(w.date)+" "+str(w.starttime),
"distance": int(w.distance),
"time": int(10*makeseconds(durationstr)),
"timezone": "Etc/UTC",
"weight_class": c2wc(w.weightcategory),
"comments": w.notes,
"heart_rate": {
"average": averagehr,
"max": maxhr,
},
"splits": split_data,
}
return data
def createc2workoutdata_grouped(w):
filename = w.csvfilename
row = rowingdata(filename)
# resize per minute
df = row.df.groupby(lambda x:x/10).mean()
averagehr = int(df[' HRCur (bpm)'].mean())
maxhr = int(df[' HRCur (bpm)'].max())
# adding diff, trying to see if this is valid
t = 10*df.ix[:,' ElapsedTime (sec)'].values
t[0] = t[1]
d = df.ix[:,' Horizontal (meters)'].values
d[0] = d[1]
p = 10*df.ix[:,' Stroke500mPace (sec/500m)'].values
t = t.astype(int)
d = d.astype(int)
p = p.astype(int)
spm = df[' Cadence (stokes/min)'].astype(int)
spm[0] = spm[1]
hr = df[' HRCur (bpm)'].astype(int)
stroke_data = []
for i in range(len(t)):
thisrecord = {"t":t[i],"d":d[i],"p":p[i],"spm":spm[i],"hr":hr[i]}
stroke_data.append(thisrecord)
try:
durationstr = datetime.strptime(str(w.duration),"%H:%M:%S.%f")
except ValueError:
durationstr = datetime.strptime(str(w.duration),"%H:%M:%S")
data = {
"type": w.workouttype,
"date": str(w.date)+" "+str(w.starttime),
"distance": int(w.distance),
"time": int(10*makeseconds(durationstr)),
"weight_class": c2wc(w.weightcategory),
"timezone": "Etc/UTC",
"comments": w.notes,
"heart_rate": {
"average": averagehr,
"max": maxhr,
},
"stroke_data": stroke_data,
}
return data
def createc2workoutdata(w):
filename = w.csvfilename
row = rowingdata(filename)
averagehr = int(row.df[' HRCur (bpm)'].mean())
maxhr = int(row.df[' HRCur (bpm)'].max())
# adding diff, trying to see if this is valid
t = 10*row.df.ix[:,'TimeStamp (sec)'].values-10*row.df.ix[0,'TimeStamp (sec)']
t[0] = t[1]
d = 10*row.df.ix[:,' Horizontal (meters)'].values
d[0] = d[1]
p = abs(10*row.df.ix[:,' Stroke500mPace (sec/500m)'].values)
p = np.clip(p,0,3600)
t = t.astype(int)
d = d.astype(int)
p = p.astype(int)
spm = row.df[' Cadence (stokes/min)'].astype(int)
spm[0] = spm[1]
hr = row.df[' HRCur (bpm)'].astype(int)
stroke_data = []
for i in range(len(t)):
thisrecord = {"t":t[i],"d":d[i],"p":p[i],"spm":spm[i],"hr":hr[i]}
stroke_data.append(thisrecord)
try:
durationstr = datetime.strptime(str(w.duration),"%H:%M:%S.%f")
except ValueError:
durationstr = datetime.strptime(str(w.duration),"%H:%M:%S")
data = {
"type": w.workouttype,
"date": str(w.date)+" "+str(w.starttime),
"timezone": "Etc/UTC",
"distance": int(w.distance),
"time": int(10*makeseconds(durationstr)),
"weight_class": c2wc(w.weightcategory),
"comments": w.notes,
"heart_rate": {
"average": averagehr,
"max": maxhr,
},
"stroke_data": stroke_data,
}
return data
def do_refresh_token(refreshtoken):
client_auth = requests.auth.HTTPBasicAuth(C2_CLIENT_ID, C2_CLIENT_SECRET)
post_data = {"grant_type": "refresh_token",
"client_secret": C2_CLIENT_SECRET,
"client_id":C2_CLIENT_ID,
"refresh_token": refreshtoken,
}
headers = {'user-agent': 'sanderroosendaal'}
response = requests.post("https://log.concept2.com/oauth/access_token",
data=post_data,
headers=headers)
token_json = response.json()
thetoken = token_json['access_token']
expires_in = token_json['expires_in']
refresh_token = token_json['refresh_token']
return [thetoken,expires_in,refresh_token]
def get_token(code):
client_auth = requests.auth.HTTPBasicAuth(C2_CLIENT_ID, C2_CLIENT_SECRET)
post_data = {"grant_type": "authorization_code",
"code": code,
"redirect_uri": C2_REDIRECT_URI,
"client_secret": C2_CLIENT_SECRET,
"client_id":C2_CLIENT_ID,
}
headers = {'user-agent': 'sanderroosendaal'}
response = requests.post("https://log.concept2.com/oauth/access_token",
data=post_data,
headers=headers)
token_json = response.json()
thetoken = token_json['access_token']
expires_in = token_json['expires_in']
refresh_token = token_json['refresh_token']
return [thetoken,expires_in,refresh_token]
def make_authorization_url(request):
# Generate a random string for the state parameter
# Save it for use later to prevent xsrf attacks
from uuid import uuid4
state = str(uuid4())
params = {"client_id": CLIENT_ID,
"response_type": "code",
"redirect_uri": REDIRECT_URI}
import urllib
url = "https://log.concept2.com/oauth/authorize?"+ urllib.urlencode(params)
# url = "https://ssl.reddit.com/api/v1/authorize?" + urllib.urlencode(params)
return HttpResponseRedirect(url)
def get_c2_workout(user,c2id):
r = Rower.objects.get(user=user)
if (r.c2token == '') or (r.c2token is None):
s = "Token doesn't exist. Need to authorize"
return custom_exception_handler(401,s)
elif (timezone.now()>r.tokenexpirydate):
s = "Token expired. Needs to refresh."
return custom_exception_handler(401,s)
else:
# ready to fetch. Hurray
authorizationstring = str('Bearer ' + r.c2token)
headers = {'Authorization': authorizationstring,
'user-agent': 'sanderroosendaal',
'Content-Type': 'application/json'}
url = "https://log.concept2.com/api/users/me/results/"+str(c2id)
s = requests.get(url,headers=headers)
return s
def get_c2_workout_strokes(user,c2id):
r = Rower.objects.get(user=user)
if (r.c2token == '') or (r.c2token is None):
return custom_exception_handler(401,s)
s = "Token doesn't exist. Need to authorize"
elif (timezone.now()>r.tokenexpirydate):
s = "Token expired. Needs to refresh."
return custom_exception_handler(401,s)
else:
# ready to fetch. Hurray
authorizationstring = str('Bearer ' + r.c2token)
headers = {'Authorization': authorizationstring,
'user-agent': 'sanderroosendaal',
'Content-Type': 'application/json'}
url = "https://log.concept2.com/api/users/me/results/"+str(c2id)+"/strokes"
s = requests.get(url,headers=headers)
return s
def get_c2_workout_list(user):
r = Rower.objects.get(user=user)
if (r.c2token == '') or (r.c2token is None):
s = "Token doesn't exist. Need to authorize"
return custom_exception_handler(401,s)
elif (timezone.now()>r.tokenexpirydate):
s = "Token expired. Needs to refresh."
return custom_exception_handler(401,s)
else:
# ready to fetch. Hurray
authorizationstring = str('Bearer ' + r.c2token)
headers = {'Authorization': authorizationstring,
'user-agent': 'sanderroosendaal',
'Content-Type': 'application/json'}
url = "https://log.concept2.com/api/users/me/results"
s = requests.get(url,headers=headers)
return s
def get_username(access_token):
authorizationstring = str('Bearer ' + access_token)
headers = {'Authorization': authorizationstring,
'user-agent': 'sanderroosendaal',
'Content-Type': 'application/json'}
import urllib
url = "https://log.concept2.com/api/users/me"
response = requests.get(url,headers=headers)
me_json = response.json()
return me_json['data']['username']
def get_userid(access_token):
authorizationstring = str('Bearer ' + access_token)
headers = {'Authorization': authorizationstring,
'user-agent': 'sanderroosendaal',
'Content-Type': 'application/json'}
import urllib
url = "https://log.concept2.com/api/users/me"
response = requests.get(url,headers=headers)
me_json = response.json()
return me_json['data']['id']
def process_callback(request):
# need error handling
code = request.GET['code']
access_token = get_token(code)
username = get_username(access_token)
return HttpResponse("got a user name: %s" % username)
def workout_c2_upload(user,w):
response = 'trying C2 upload'
r = Rower.objects.get(user=user)
if (r.c2token == '') or (r.c2token is None):
s = "Token doesn't exist. Need to authorize"
return custom_exception_handler(401,s)
elif (timezone.now()>r.tokenexpirydate):
s = "Token expired. Needs to refresh."
return custom_exception_handler(401,s)
else:
# ready to upload. Hurray
if (checkworkoutuser(user,w)):
c2userid = get_userid(r.c2token)
data = createc2workoutdata(w)
# if (w.workouttype=='water'):
# data = createc2workoutdata_as_splits(w)
authorizationstring = str('Bearer ' + r.c2token)
headers = {'Authorization': authorizationstring,
'user-agent': 'sanderroosendaal',
'Content-Type': 'application/json'}
import urllib
url = "https://log.concept2.com/api/users/%s/results" % (c2userid)
response = requests.post(url,headers=headers,data=json.dumps(data))
if (response.status_code == 201):
s= json.loads(response.text)
c2id = s['data']['id']
w.uploadedtoc2 = c2id
w.save()
else:
response = "You are not authorized to upload this workout"
return response
def rower_c2_token_refresh(user):
r = Rower.objects.get(user=user)
res = do_refresh_token(r.c2refreshtoken)
access_token = res[0]
expires_in = res[1]
refresh_token = res[2]
expirydatetime = timezone.now()+timedelta(seconds=expires_in)
r = Rower.objects.get(user=user)
r.c2token = access_token
r.tokenexpirydate = expirydatetime
r.c2refreshtoken = refresh_token
r.save()
return r.c2token

Binary file not shown.

Binary file not shown.

View File

@@ -1,80 +0,0 @@
import time
from django.views.generic.base import TemplateView
from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import authenticate, login, logout
from rowers.forms import LoginForm,DocumentsForm,UploadOptionsForm
from django.core.urlresolvers import reverse
from django.conf import settings
from django.utils.datastructures import MultiValueDictKeyError
from django.utils import timezone,translation
from django.core.mail import send_mail, BadHeaderError
from rowers.forms import EmailForm, RegistrationForm, RegistrationFormTermsOfService,RegistrationFormUniqueEmail,CNsummaryForm,UpdateWindForm,UpdateStreamForm
from rowers.forms import PredictedPieceForm
from rowers.models import Workout, User, Rower, WorkoutForm,RowerForm,GraphImage,AdvancedWorkoutForm
import StringIO
from django.contrib.auth.decorators import login_required,user_passes_test
from time import strftime,strptime,mktime,time,daylight
import os,sys
import datetime
import iso8601
import c2stuff
from c2stuff import C2NoTokenError
from iso8601 import ParseError
import stravastuff
import sporttracksstuff
from rowsandall_app.settings import C2_CLIENT_ID, C2_REDIRECT_URI, C2_CLIENT_SECRET, STRAVA_CLIENT_ID, STRAVA_REDIRECT_URI, STRAVA_CLIENT_SECRET
from rowsandall_app.settings import SPORTTRACKS_CLIENT_ID, SPORTTRACKS_REDIRECT_URI, SPORTTRACKS_CLIENT_SECRET
import requests
import json
from rowsandall_app.rows import handle_uploaded_file
from rowers.tasks import handle_makeplot,handle_otwsetpower,handle_sendemailtcx
from scipy.signal import savgol_filter
from rowingdata import rower as rrower
from rowingdata import main as rmain
from rowingdata import rowingdata as rdata
from rowingdata import TCXParser,RowProParser,ErgDataParser,TCXParserNoHR
from rowingdata import painsledDesktopParser,speedcoachParser,ErgStickParser
from rowingdata import SpeedCoach2Parser,FITParser,fitsummarydata
from rowingdata import make_cumvalues
from rowingdata import summarydata,get_file_type
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from pytz import timezone as tz,utc
import dateutil
import mpld3
from mpld3 import plugins
import stravalib
from stravalib.exc import ActivityUploadFailed,TimeoutExceeded
from weather import get_wind_data
import django_rq
queue = django_rq.get_queue('default')
queuelow = django_rq.get_queue('low')
queuehigh = django_rq.get_queue('low')
import plots
from io import BytesIO
from scipy.special import lambertw
def emailall(emailfile,subject):
rowers = Rower.objects.all()
for rower in rowers:
email = rower.user.email
firstname = rower.user.first_name
with open(emailfile) as f:
message = f.read()
message = '\nDear '+firstname+'\n\n'+str(message)
print message
send_mail(
subject,
message,
'info@rowsandall.com',
[email],
)

View File

@@ -1,9 +0,0 @@
It is a little while since you registered at Rowsandall.com and we do hope you are enjoying analysing your rowing data using the tools we have designed. We are continuing to add features and functionality to the site as we grow and hopefully you will have seen some of these developments since you registered.
We are always interested in users' views on Rowsandall.com as we strive to improve the interface and functionality of the site. We have therefore compiled a short questionnaire to capture your thoughts and experiences. The questionnaire can be found at:
https://surveynuts.com/surveys/take?id=108060&c=764200337FDHD
We do ask that you take a few moments to complete the survey and we would also welcome any other suggestions you may have directly to us (insert email address) if you feel a free-form response suits you better. Respondents to the questionnaire will receive a complementary Pro membership for 3 months.
Best regards, Sander Roosendaal & the Rowsandall Team

Binary file not shown.

View File

@@ -1,215 +0,0 @@
from django import forms
from rowers.models import Workout
from rowsandall_app.rows import validate_file_extension,must_be_csv
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.contrib.admin.widgets import AdminDateWidget
from django.forms.extras.widgets import SelectDateWidget
from django.utils import timezone,translation
import datetime
class LoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget=forms.PasswordInput())
class EmailForm(forms.Form):
firstname = forms.CharField(max_length=255)
lastname = forms.CharField(max_length=255)
email = forms.EmailField()
subject = forms.CharField(max_length=255)
botcheck = forms.CharField(max_length=5)
message = forms.CharField()
class CNsummaryForm(forms.Form):
file = forms.FileField(required=True,validators=[must_be_csv])
class SummaryStringForm(forms.Form):
intervalstring = forms.CharField(max_length=255,label='Workout Description')
class DocumentsForm(forms.Form):
filetypechoices = (
('csv' , 'Painsled iOS CSV'),
('tcx' , 'TCX'),
('tcxnohr' , 'TCX No HR'),
('rp' , 'RowPro CSV'),
('speedcoach' , 'SpeedCoach GPS CSV'),
('speedcoach2' , 'SpeedCoach GPS 2 CSV'),
('ergdata' , 'ErgData CSV'),
('ergstick' , 'ErgStick CSV'),
('painsleddesktop' , 'Painsled Desktop CSV'),
)
title = forms.CharField(required=False)
file = forms.FileField(required=True,
validators=[validate_file_extension])
workouttype = forms.ChoiceField(required=True,
choices=Workout.workouttypes,
initial='rower')
# fileformat = forms.ChoiceField(required=True,
# choices=filetypechoices,
# initial='csv')
notes = forms.CharField(required=False,
widget=forms.Textarea)
class Meta:
fields = ['title','file','workouttype','fileformat']
class UploadOptionsForm(forms.Form):
plotchoices = (
('timeplot','Time Plot'),
('distanceplot','Distance Plot'),
('pieplot','Pie Chart'),
)
make_plot = forms.BooleanField(initial=False)
plottype = forms.ChoiceField(required=False,
choices=plotchoices,
initial='timeplot')
upload_to_C2 = forms.BooleanField(initial=False)
class Meta:
fields = ['make_plot','plottype','upload_toc2']
class PredictedPieceForm(forms.Form):
unitchoices = (
('t','minutes'),
('d','meters'),
)
pieceunit = forms.ChoiceField(required=True,choices=unitchoices,
initial='t',label='Unit')
value = forms.IntegerField(initial=10,label='Value')
class Meta:
fields = ['value','pieceunit']
class UpdateStreamForm(forms.Form):
unitchoices = (
('m','m/s'),
('f','foot/s'),
('k','knots'),
('p','pace difference (sec/500m)'),
)
dist1 = forms.FloatField(initial=0,label = 'Distance 1')
dist2 = forms.FloatField(initial=1000,label = 'Distance 2')
stream1 = forms.FloatField(initial=0,label = 'Stream velocity 1')
stream2 = forms.FloatField(initial=0,label = 'Stream velocity 2')
streamunit = forms.ChoiceField(required=True,
choices=unitchoices,
initial='m',
label='Unit')
class Meta:
fields = ['dist1','dist2','stream1', 'stream2','streamunit']
class UpdateWindForm(forms.Form):
unitchoices = (
('m','m/s'),
('k','knots'),
('b','beaufort'),
('kmh','km/h'),
('mph','miles/hour'),
)
dist1 = forms.FloatField(initial=0,label = 'Distance 1')
dist2 = forms.FloatField(initial=1000,label = 'Distance 2')
vwind1 = forms.FloatField(initial=0,required=False,label = 'Wind Speed 1')
vwind2 = forms.FloatField(initial=0,required=False,label = 'Wind Speed 2')
windunit = forms.ChoiceField(required=True,
choices=unitchoices,
initial='m',
label='Unit')
winddirection1 = forms.IntegerField(initial=0,required=False,
label = 'Wind Direction 1')
winddirection2 = forms.IntegerField(initial=0,required=False,
label = 'Wind Direction 2')
class Meta:
fields = ['dist1','dist2',
'vwind1','vwind2',
'windunit',
'winddirection1','winddirection2']
class DateRangeForm(forms.Form):
startdate = forms.DateField(initial=timezone.now()-datetime.timedelta(days=365),
widget=SelectDateWidget(years=range(1990,2050)),
label='Start Date')
enddate = forms.DateField(initial=timezone.now(),
widget=SelectDateWidget(years=range(1990,2050)),
label='End Date')
class Meta:
fields = ['startdate','enddate']
class DeltaDaysForm(forms.Form):
deltadays = forms.IntegerField(initial=0,required=False,label='')
class RegistrationForm(UserCreationForm):
"""
Form for registering a new user account.
Validates that the requested username is not already in use, and
requires the password to be entered twice to catch typos.
Subclasses should feel free to add any additional validation they
need, but should avoid defining a ``save()`` method -- the actual
saving of collected user data is delegated to the active
registration backend.
"""
required_css_class = 'required'
email = forms.EmailField(label="E-mail")
class Meta:
model = User
fields = ("username", "first_name", "last_name", "email", "password1", "password2")
class RegistrationFormTermsOfService(RegistrationForm):
"""
Subclass of ``RegistrationForm`` which adds a required checkbox
for agreeing to a site's Terms of Service.
"""
tos = forms.BooleanField(widget=forms.CheckboxInput,
label='I have read and agree to the Terms of Service',
error_messages={'required': "You must agree to the terms to register"})
class RegistrationFormUniqueEmail(RegistrationFormTermsOfService):
"""
Subclass of ``RegistrationFormTermsOfService`` which enforces uniqueness of
email addresses.
"""
def clean_email(self):
"""
Validate that the supplied email address is unique for the
site.
"""
if User.objects.filter(email__iexact=self.cleaned_data['email']):
raise forms.ValidationError("This email address is already in use. Please supply a different email address.")
return self.cleaned_data['email']
class IntervalUpdateForm(forms.Form):
def __init__(self, *args, **kwargs):
typechoices = (
(1,'single time'),
(2,'single distance'),
(3,'rest (time based)'),
(3,'rest (distance based)'),
(4,'work (time based)'),
(5,'work (distance based)'),
)
aantal = int(kwargs.pop('aantal'))
super(IntervalUpdateForm, self).__init__(*args, **kwargs)
for i in range(aantal):
self.fields['intervalt_%s' % i] = forms.TimeField(label='Time '+str(i+1))
self.fields['intervald_%s' % i] = forms.IntegerField(label='Distance '+str(i+1))
self.fields['type_%s' % i] = forms.ChoiceField(choices=typechoices,
required=True,
initial=4,
label = 'Type '+str(i+1))
self.fields['intervalt_%s' % i].widget.attrs['style'] = 'width:76px; height: 16px;'
self.fields['intervald_%s' % i].widget.attrs['style'] = 'width:76px; height: 16px;'
self.fields['type_%s' % i].widget.attrs['style'] = 'width:156px; height: 22px;'

View File

@@ -787,10 +787,24 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
thedata['driveenergy'] = thedata[' DriveLength (meters)']*thedata[' AverageDriveForce (lbs)']*4.44822
# throw out zeros from dataframe
thedata = thedata[thedata[csvcolumns[yparam1]] > 0]
thedata = thedata[thedata[csvcolumns[xparam]] > 0]
if yparam2 != 'None':
thedata = thedata[thedata[csvcolumns[yparam2]] > 0]
# check if dataframe not empty
if thedata.empty:
return ['','<p>No non-zero data in selection</p>','','']
spm = thedata.ix[:,csvcolumns['spm']]
f = thedata['TimeStamp (sec)'].diff().mean()
windowsize = 2*(int(10./(f)))+1
if not np.isnan(f):
windowsize = 2*(int(10./(f)))+1
else:
windowsize = 5
if windowsize <= 3:
windowsize = 5
@@ -806,8 +820,6 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
thedata['drivespeed'] = drivelength/thedata[' DriveTime (ms)']*1.0e3
# get user
# u = User.objects.get(id=row.user.id)
x1 = thedata.ix[:,csvcolumns[xparam]]
@@ -819,9 +831,31 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
if xparam=='time':
xaxmax = get_datetimes([x1.max()])[0]
xaxmin = get_datetimes([x1.min()])[0]
xaxmax = x1.max()
xaxmin = x1.min()
xaxmax = get_datetimes([xaxmax],tzinfo=1)[0]
xaxmin = get_datetimes([xaxmin],tzinfo=1)[0]
x1 = get_datetimes(x1,tzinfo=1)
elif xparam=='distance':
xaxmax = x1.max()
xaxmin = x1.min()
else:
xaxmax = yaxmaxima[xparam]
xaxmin = yaxminima[xparam]
# average values
if xparam != 'time':
x1mean = x1.mean()
else:
x1mean = 0
y1mean = y1.mean()
y2mean = y2.mean()
if xparam != 'time':
xvals = xaxmin+np.arange(100)*(xaxmax-xaxmin)/100.
else:
xvals = np.arange(100)
x_axis_type = 'linear'
y_axis_type = 'linear'
@@ -836,7 +870,6 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
time = thedata.ix[:,csvcolumns['time']]
time = time-time[0]
hr = thedata.ix[:,csvcolumns['hr']]
if windowsize > 3:
@@ -849,6 +882,7 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
power = thedata.ix[:,csvcolumns['power']]
# Add hover to this comma-separated string and see what changes
if (promember==1):
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,resize,crosshair'
@@ -856,11 +890,21 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
TOOLS = 'pan,box_zoom,wheel_zoom,reset,tap,hover,crosshair'
plot = Figure(x_axis_type=x_axis_type,y_axis_type=y_axis_type,
plot_width=900,
tools=TOOLS,
toolbar_location="above",
toolbar_sticky=False)
x1means = Span(location=x1mean,dimension='height',line_color='green',
line_dash=[6,6], line_width=2)
y1means = Span(location=y1mean,dimension='width',line_color='blue',
line_dash=[6,6],line_width=2)
y2means = y1means
if (xparam != 'time') and (xparam != 'distance'):
plot.add_layout(x1means)
plot.add_layout(y1means)
source = ColumnDataSource(
data = dict(
@@ -877,9 +921,24 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
)
)
source2 = ColumnDataSource(
data = dict(
x1=x1,
y1=y1,
y2=y2,
time=niceformat(get_datetimes(time,tzinfo=1)),
pace=nicepaceformat(get_datetimes(pace)),
hr = hr,
spm = spm,
spmc=np.rint(10*spm)/10.,
distance=distance,
power=power,
)
)
# plot.circle('x1','y1',source=source,legend=yparam1,size=3)
plot.circle('x1','y1',source=source,fill_alpha=0.3,line_color=None,
plot.circle('x1','y1',source=source2,fill_alpha=0.3,line_color=None,
legend=yparamname1,
)
@@ -921,11 +980,17 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
plot.circle('x1','y2',color="red",y_range_name="yax2",
legend=yparamname2,
source=source,fill_alpha=0.3,line_color=None)
source=source2,fill_alpha=0.3,line_color=None)
plot.add_layout(LinearAxis(y_range_name="yax2",
axis_label=axlabels[yparam2]),'right')
y2means = Span(location=y2mean,dimension='width',line_color='red',
line_dash=[6,6],line_width=2,y_range_name="yax2")
plot.add_layout(y2means)
hover = plot.select(dict(type=HoverTool))
@@ -939,11 +1004,119 @@ def interactive_cum_flex_chart(theworkouts,promember=0,
hover.mode = 'mouse'
callback = CustomJS(args = dict(source=source,source2=source2,
x1means=x1means,
y1means=y1means,
y2means=y2means), code="""
var data = source.data
var data2 = source2.data
var x1 = data['x1']
var y1 = data['y1']
var y2 = data['y2']
var spm1 = data['spm']
var time1 = data['time']
var pace1 = data['pace']
var hr1 = data['hr']
var spmc1 = data['spmc']
var distance1 = data['distance']
var power1 = data['power']
var minspm = minspm.value
var maxspm = maxspm.value
var mindist = mindist.value
var maxdist = maxdist.value
var xm = 0
var ym1 = 0
var ym2 = 0
data2['x1'] = []
data2['y1'] = []
data2['y2'] = []
data2['spm'] = []
data2['time'] = []
data2['pace'] = []
data2['hr'] = []
data2['spmc'] = []
data2['distance'] = []
data2['power'] = []
data2['x1mean'] = []
data2['y1mean'] = []
data2['y2mean'] = []
data2['xvals'] = []
data2['y1vals'] = []
data2['y2vals'] = []
for (i=0; i<x1.length; i++) {
if (spm1[i]>=minspm && spm1[i]<=maxspm) {
if (distance1[i]>=mindist && distance1[i]<=maxdist) {
data2['x1'].push(x1[i])
data2['y1'].push(y1[i])
data2['y2'].push(y2[i])
data2['spm'].push(spm1[i])
data2['time'].push(time1[i])
data2['pace'].push(pace1[i])
data2['hr'].push(hr1[i])
data2['spmc'].push(spmc1[i])
data2['distance'].push(distance1[i])
data2['power'].push(power1[i])
xm += x1[i]
ym1 += y1[i]
ym2 += y2[i]
}
}
}
xm /= data2['x1'].length
ym1 /= data2['x1'].length
ym2 /= data2['x1'].length
data2['x1mean'] = [xm,xm]
data2['y1mean'] = [ym1,ym1]
data2['y2mean'] = [ym2,ym2]
x1means.location = xm
y1means.location = ym1
y2means.location = ym2
source2.trigger('change');
""")
slider_spm_min = Slider(start=15.0, end=55,value=15.0, step=.1,
title="Min SPM",callback=callback)
callback.args["minspm"] = slider_spm_min
slider_spm_max = Slider(start=15.0, end=55,value=55.0, step=.1,
title="Max SPM",callback=callback)
callback.args["maxspm"] = slider_spm_max
distmax = 100+100*int(distance.max()/100.)
slider_dist_min = Slider(start=0,end=distmax,value=0,step=1,
title="Min Distance",callback=callback)
callback.args["mindist"] = slider_dist_min
slider_dist_max = Slider(start=0,end=distmax,value=distmax,
step=1,
title="Max Distance",callback=callback)
callback.args["maxdist"] = slider_dist_max
layout = layoutrow([layoutcolumn([slider_spm_min,
slider_spm_max,
slider_dist_min,
slider_dist_max,
],
),
plot])
script, div = components(layout)
js_resources = INLINE.render_js()
css_resources = INLINE.render_css()
script, div = components(plot)
return [script,div]
return [script,div,js_resources,css_resources]
@@ -1389,7 +1562,6 @@ def interactive_flex_chart2(id=0,promember=0,
y2 = y1
if xparam=='time':
xaxmax = x1.max()
xaxmin = x1.min()
xaxmax = get_datetimes([xaxmax],tzinfo=1)[0]
@@ -1574,6 +1746,7 @@ def interactive_flex_chart2(id=0,promember=0,
plot.line('x1','y2',color="red",y_range_name="yax2",
legend=axlabels[yparam2],
source=source2)
<<<<<<< HEAD
elif plottype=='scatter':
# plot.circle(x1,y2,color="red",y_range_name="yax2",legend=yparam2,
@@ -1605,6 +1778,39 @@ def interactive_flex_chart2(id=0,promember=0,
hover.mode = 'mouse'
=======
elif plottype=='scatter':
# plot.circle(x1,y2,color="red",y_range_name="yax2",legend=yparam2,
# source=source,size=3)
plot.scatter('x1','y2',source=source2,legend=axlabels[yparam2]
,fill_alpha=0.4,
line_color=None,color="red",y_range_name="yax2")
plot.add_layout(LinearAxis(y_range_name="yax2",
axis_label=axlabels[yparam2]),'right')
y2means = Span(location=y2mean,dimension='width',line_color='red',
line_dash=[6,6],line_width=2,y_range_name="yax2")
plot.add_layout(y2means)
hover = plot.select(dict(type=HoverTool))
hover.tooltips = OrderedDict([
('Time','@time'),
('Distance','@distance'),
('Pace','@pace'),
('HR','@hr'),
('SPM','@spmc{1.1}'),
('Power','@power{int}'),
])
hover.mode = 'mouse'
>>>>>>> feature/sliders
callback = CustomJS(args = dict(source=source,source2=source2,
x1means=x1means,
y1means=y1means,

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More