[chronojump-server] changing column station_id by stationID in Exercice table
- From: Marcos Venteo Garcia <mventeo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump-server] changing column station_id by stationID in Exercice table
- Date: Wed, 12 Sep 2018 11:54:58 +0000 (UTC)
commit 11ee00b81e3d2e4685ce09500e4697136f1365af
Author: Marcos Venteo García <mventeo me com>
Date: Sat Sep 8 19:17:17 2018 +0200
changing column station_id by stationID in Exercice table
.../migrations/0007_auto_20180908_1659.py | 21 +++++++++++++++++++++
.../chronojump_networks/organizations/models.py | 3 ++-
.../players/add_edit_player_form.html | 22 +++++++++++++++-------
3 files changed, 38 insertions(+), 8 deletions(-)
---
diff --git a/chronojumpserver-django/chronojump_networks/organizations/migrations/0007_auto_20180908_1659.py
b/chronojumpserver-django/chronojump_networks/organizations/migrations/0007_auto_20180908_1659.py
new file mode 100644
index 0000000..4f9ed7d
--- /dev/null
+++ b/chronojumpserver-django/chronojump_networks/organizations/migrations/0007_auto_20180908_1659.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.1 on 2018-09-08 16:59
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organizations', '0006_auto_20180402_1751'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='exercise',
+ name='station',
+ field=models.ForeignKey(db_column='stationId', on_delete=django.db.models.deletion.CASCADE,
related_name='exercises', to='organizations.Station'),
+ ),
+ ]
diff --git a/chronojumpserver-django/chronojump_networks/organizations/models.py
b/chronojumpserver-django/chronojump_networks/organizations/models.py
index 688b119..0c52745 100644
--- a/chronojumpserver-django/chronojump_networks/organizations/models.py
+++ b/chronojumpserver-django/chronojump_networks/organizations/models.py
@@ -173,7 +173,8 @@ class Exercise(ChronojumpBaseModel):
station = models.ForeignKey(Station,
on_delete=models.CASCADE,
- related_name='exercises')
+ related_name='exercises',
+ db_column='stationId')
percentBodyMassDisplaced = models.FloatField(null=True, default=0)
diff --git
a/chronojumpserver-django/chronojump_networks/templates/organizations/players/add_edit_player_form.html
b/chronojumpserver-django/chronojump_networks/templates/organizations/players/add_edit_player_form.html
index d797868..7fe41b6 100644
--- a/chronojumpserver-django/chronojump_networks/templates/organizations/players/add_edit_player_form.html
+++ b/chronojumpserver-django/chronojump_networks/templates/organizations/players/add_edit_player_form.html
@@ -5,21 +5,18 @@
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
- <h5 class="modal-title" id="taskModalTitle"></h5>
+ <h5 class="modal-title" id="taskModalTitle">{% trans 'Add new player' %}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form>
+ <div class="row">
<div class="col-sm-4">
<div class="form-group col-sm-4">
- <label for="photo">{% trans 'Player photography'
%}</label>
- <select name="gym" class="form-control"
id="gymSelect">
- {% for gym in user.organization.gyms.all %}
- <option value={{gym.id}}>{{gym.name}}</option>
- {% endfor %}
- </select>
+ <label for="photo">{% trans 'Photography' %}</label>
+ <img src="..." alt="..." class="img-thumbnail">
</div>
</div>
<div class="col-sm-8">
@@ -27,7 +24,18 @@
<label for="fullname">{% trans 'Fullname' %}</label>
<input name="fullname" class="form-control"
id="fullname" type="text">
</div>
+ <div class="form-row">
+ <div class="col-sm-6">
+ <label for="height">{% trans 'Height'
%}</label>
+ <input name="height" class="form-control"
id="height" type="number" min="0" step="1">
+ </div>
+ <div class="col-sm-6">
+ <label for="weight">{% trans 'Weight'
%}</label>
+ <input name="weight" class="form-control"
id="weight" type="number" min="0" step="1">
+ </div>
+ </div>
</div>
+ </div>
</form>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]