[WIP] Add mobility and flexibility funtionality
This commit is contained in:
parent
1b6c56199f
commit
7aeed36fe8
|
@ -0,0 +1,149 @@
|
|||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% load has_group %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-sm-12 col-md-8 col-lg-8 col-xl-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="">{% if strength_id %}Edit{% else %}Add{% endif %} Strength</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{% if strength_id %}{% url 'strength_update' strength_id %}{% else %}{% url 'strength_create' %}{% endif %}" method="post" class="form-horizontal" id="formulaire" name="formulaire">
|
||||
{% csrf_token %}
|
||||
<div class="form-group row ">
|
||||
<label for="id_date" class="col-5 col-sm-5 col-form-label">Gymnast <span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-sm-8 col-md-6 col-lg-6 col-xl-6 {% if form.jumper.errors %}has-danger{% endif %}">
|
||||
{% if request.user|has_group:"trainer" %}
|
||||
{{ form.gymnast }}
|
||||
{{ form.gymnast_related }}
|
||||
{% if form.gymnast.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.gymnast.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
{% else %}
|
||||
<input type="text" class="form-control" value="{{ request.user.first_name }} {{ request.user.last_name }}" readonly="readonly" />
|
||||
<input type="hidden" name="gymnast" id="gymnast" value="{{ request.user.gymnast.id }}" />
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row ">
|
||||
<label for="id_date" class="col-5 col-sm-5 col-form-label">{{ form.date.label }} <span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-sm-3 col-md-4 col-lg-4 col-xl-4 {% if form.date.errors %}has-danger{% endif %}">
|
||||
{{ form.date }}
|
||||
{% if form.date.errors %}<span class="btn btn-sm btn-danger-outline">{% for error in form.date.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row ">
|
||||
<label for="id_harmstring_right_prone" class="col-5 col-sm-5 col-form-label">{{ form.harmstring_right_prone.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.harmstring_right_prone.errors %}has-danger{% endif %}">
|
||||
{{ form.harmstring_right_prone }}
|
||||
{% if form.harmstring_right_prone.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.harmstring_right_prone.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row ">
|
||||
<label for="id_harmstring_left_prone" class="col-5 col-sm-5 col-form-label">{{ form.harmstring_left_prone.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.harmstring_left_prone.errors %}has-danger{% endif %}">
|
||||
{{ form.harmstring_left_prone }}
|
||||
{% if form.harmstring_left_prone.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.harmstring_left_prone.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row ">
|
||||
<label for="id_quadriceps_right_seated" class="col-5 col-sm-5 col-form-label">{{ form.quadriceps_right_seated.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.quadriceps_right_seated.errors %}has-danger{% endif %}">
|
||||
{{ form.quadriceps_right_seated }}
|
||||
{% if form.quadriceps_right_seated.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.quadriceps_right_seated.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row ">
|
||||
<label for="id_quadriceps_left_seated" class="col-5 col-sm-5 col-form-label">{{ form.quadriceps_left_seated.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.quadriceps_left_seated.errors %}has-danger{% endif %}">
|
||||
{{ form.quadriceps_left_seated }}
|
||||
{% if form.quadriceps_left_seated.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.quadriceps_left_seated.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row ">
|
||||
<label for="id_hip_adductor_right" class="col-5 col-sm-5 col-form-label">{{ form.hip_adductor_right.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.hip_adductor_right.errors %}has-danger{% endif %}">
|
||||
{{ form.hip_adductor_right }}
|
||||
{% if form.hip_adductor_right.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.hip_adductor_right.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row ">
|
||||
<label for="id_hip_adductor_left" class="col-5 col-sm-5 col-form-label">{{ form.hip_adductor_left.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.hip_adductor_left.errors %}has-danger{% endif %}">
|
||||
{{ form.hip_adductor_left }}
|
||||
{% if form.hip_adductor_left.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.hip_adductor_left.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row ">
|
||||
<label for="id_hip_abductor_right" class="col-5 col-sm-5 col-form-label">{{ form.hip_abductor_right.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.hip_abductor_right.errors %}has-danger{% endif %}">
|
||||
{{ form.hip_abductor_right }}
|
||||
{% if form.hip_abductor_right.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.hip_abductor_right.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row ">
|
||||
<label for="id_hip_abductor_left" class="col-5 col-sm-5 col-form-label">{{ form.hip_abductor_left.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.hip_abductor_left.errors %}has-danger{% endif %}">
|
||||
{{ form.hip_abductor_left }}
|
||||
{% if form.hip_abductor_left.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.hip_abductor_left.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row ">
|
||||
<label for="id_shoulder_external_rotator_right" class="col-5 col-sm-5 col-form-label">{{ form.shoulder_external_rotator_right.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.shoulder_external_rotator_right.errors %}has-danger{% endif %}">
|
||||
{{ form.shoulder_external_rotator_right }}
|
||||
{% if form.shoulder_external_rotator_right.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.shoulder_external_rotator_right.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row ">
|
||||
<label for="id_shoulder_external_rotator_left" class="col-5 col-sm-5 col-form-label">{{ form.shoulder_external_rotator_left.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.shoulder_external_rotator_left.errors %}has-danger{% endif %}">
|
||||
{{ form.shoulder_external_rotator_left }}
|
||||
{% if form.shoulder_external_rotator_left.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.shoulder_external_rotator_left.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row ">
|
||||
<label for="id_shoulder_internal_rotator_right" class="col-5 col-sm-5 col-form-label">{{ form.shoulder_internal_rotator_right.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.shoulder_internal_rotator_right.errors %}has-danger{% endif %}">
|
||||
{{ form.shoulder_internal_rotator_right }}
|
||||
{% if form.shoulder_internal_rotator_right.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.shoulder_internal_rotator_right.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row ">
|
||||
<label for="id_shoulder_internal_rotator_left" class="col-5 col-sm-5 col-form-label">{{ form.shoulder_internal_rotator_left.label }}<span class="text-danger"><b>*</b></span></label>
|
||||
<div class="col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 {% if form.shoulder_internal_rotator_left.errors %}has-danger{% endif %}">
|
||||
{{ form.shoulder_internal_rotator_left }}
|
||||
{% if form.shoulder_internal_rotator_left.errors %} <span class="btn btn-sm btn-danger-outline">{% for error in form.shoulder_internal_rotator_left.errors %}{{ error }}{% endfor %}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-center">
|
||||
<input type="submit" value="{% if stability_id %}Save{% else %}Add{% endif %}" class="btn btn-warning" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footerscript %}
|
||||
<script type="text/javascript" >
|
||||
$(function(){
|
||||
blackDashboard.initDateTimePicker();
|
||||
});
|
||||
|
||||
const csrf_token = "{{ csrf_token|escapejs }}";
|
||||
const gymnast_lookup = "{% url 'gymnast_lookup' %}";
|
||||
const skill_lookup = "{% url 'skill_lookup' %}";
|
||||
</script>
|
||||
<script src="{% static "js/template_users/datepicker_maxdate_today.js" %}"></script>
|
||||
{% if request.session.template == 0 %}
|
||||
<script src="{% static "js/template_users/gymnast_autocomplete_black.js" %}"></script>
|
||||
{% else %}
|
||||
<script src="{% static "js/template_users/gymnast_autocomplete.js" %}"></script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,125 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-sm-8 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="mb-0">Mobility & Flexibility on {{ mobility_flexibility.date | date:"j N Y" }}</h4>
|
||||
<a href="{% url 'gymnast_details_tab' mobility_flexibility.gymnast.id 'physiological' %}">{{ mobility_flexibility.gymnast }}</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<td>hip_internal_rotation_right</td>
|
||||
<td>{{ mobility_flexibility.hip_internal_rotation_right }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hip_internal_rotation_left</td>
|
||||
<td>{{ mobility_flexibility.hip_internal_rotation_left }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>harmstring_aket_right</td>
|
||||
<td>{{ mobility_flexibility.harmstring_aket_right }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>harmstring_aket_left</td>
|
||||
<td>{{ mobility_flexibility.harmstring_aket_left }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>elys_test_right</td>
|
||||
<td>{{ mobility_flexibility.elys_test_right }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>elys_test_left</td>
|
||||
<td>{{ mobility_flexibility.elys_test_left }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bent_knee_fall_out_test_right</td>
|
||||
<td>{{ mobility_flexibility.bent_knee_fall_out_test_right }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bent_knee_fall_out_test_left</td>
|
||||
<td>{{ mobility_flexibility.bent_knee_fall_out_test_left }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>knee_to_wall_test_right</td>
|
||||
<td>{{ mobility_flexibility.knee_to_wall_test_right }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>knee_to_wall_test_left</td>
|
||||
<td>{{ mobility_flexibility.knee_to_wall_test_left }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>shoulder_anteversion_supine_right</td>
|
||||
<td>{{ mobility_flexibility.shoulder_anteversion_supine_right }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shoulder_anteversion_supine_left</td>
|
||||
<td>{{ mobility_flexibility.shoulder_anteversion_supine_left }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shoulder_external_rotation_right</td>
|
||||
<td>{{ mobility_flexibility.shoulder_external_rotation_right }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shoulder_external_rotation_left</td>
|
||||
<td>{{ mobility_flexibility.shoulder_external_rotation_left }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shoulder_internal_rotation_right</td>
|
||||
<td>{{ mobility_flexibility.shoulder_internal_rotation_right }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>shoulder_internal_rotation_left</td>
|
||||
<td>{{ mobility_flexibility.shoulder_internal_rotation_left }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>functional_external_rotation_right</td>
|
||||
<td>{{ mobility_flexibility.functional_external_rotation_right }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>functional_external_rotation_left</td>
|
||||
<td>{{ mobility_flexibility.functional_external_rotation_left }}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>mod_thomas_test_right</td>
|
||||
<td>{{ mobility_flexibility.get_mod_thomas_test_right_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mod_thomas_test_left</td>
|
||||
<td>{{ mobility_flexibility.get_mod_thomas_test_left_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>lombo_pelvic_control</td>
|
||||
<td>{{ mobility_flexibility.get_lombo_pelvic_control_display }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>cervical_control</td>
|
||||
<td>{{ mobility_flexibility.get_cervical_control_display }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="card-footer pl-0 pb-0">
|
||||
<a href="{% url 'mobility_flexibility_list' %}">
|
||||
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
||||
<i class="tim-icons icon-double-left"></i>
|
||||
</button>
|
||||
</a>
|
||||
<a href="{% url 'mobility_flexibility_create_for_gymnast' mobility_flexibility.gymnast.id %}">
|
||||
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
||||
+
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
|
@ -0,0 +1,104 @@
|
|||
{% extends "listing.html" %}
|
||||
|
||||
{% block datacontent %}
|
||||
<div class="card mb-0">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<h4 class=""> Mobility & Flexibility Listing</h4>
|
||||
</div>
|
||||
<div class="col-1 ml-auto">
|
||||
<div class="text-right">
|
||||
<a href="{% url 'mobility_flexibility_create' %}">
|
||||
<button type="submit" value="add" class="btn btn-icon btn-warning">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
{% if mobility_flexibility_list %}
|
||||
<table class="table tablesorter table-striped" data-sort="table" id="strength_table">
|
||||
<thead class="text-primary">
|
||||
<tr>
|
||||
<th style="width: 3%"></th>
|
||||
<th class="header text-left" style="width: 8%">Date</th>
|
||||
<th class="header text-left" style="width: 20%">Gymnast</th>
|
||||
|
||||
<th class="header text-left">hip_internal_rotation_right</th>
|
||||
<th class="header text-left">hip_internal_rotation_left</th>
|
||||
<th class="header text-left">harmstring_aket_right</th>
|
||||
<th class="header text-left">harmstring_aket_left</th>
|
||||
|
||||
<th class="header text-left">elys_test_right</th>
|
||||
<th class="header text-left">elys_test_left</th>
|
||||
<th class="header text-left">bent_knee_fall_out_test_right</th>
|
||||
<th class="header text-left">bent_knee_fall_out_test_left</th>
|
||||
|
||||
<th class="header text-left">shoulder_anteversion_supine_right</th>
|
||||
<th class="header text-left">shoulder_anteversion_supine_left</th>
|
||||
<th class="header text-left">shoulder_external_rotation_right</th>
|
||||
<th class="header text-left">shoulder_external_rotation_left</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for mobility_flexibility in mobility_flexibility_list %}
|
||||
<tr role="row" class="{% cycle 'odd' 'even' %}">
|
||||
<td>
|
||||
<a href="{% url 'mobility_flexibility_update' mobility_flexibility.id %}">
|
||||
<span class="tim-icons icon-pencil text-warning"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-left"><a href="{% url 'mobility_flexibility_details' mobility_flexibility.id %}">{{ mobility_flexibility.date | date:"d-m-Y" }}</a></td>
|
||||
<td class="text-left"><a href="{% url 'gymnast_details_tab' mobility_flexibility.gymnast.id 'physiological' %}">{{ mobility_flexibility.gymnast }}</a></td>
|
||||
|
||||
<td class="text-left">{{ mobility_flexibility.hip_internal_rotation_right }}</td>
|
||||
<td class="text-left">{{ mobility_flexibility.hip_internal_rotation_left }}</td>
|
||||
<td class="text-left">{{ mobility_flexibility.harmstring_aket_right }}</td>
|
||||
<td class="text-left">{{ mobility_flexibility.harmstring_aket_left }}</td>
|
||||
|
||||
<td class="text-left">{{ mobility_flexibility.elys_test_right }}</td>
|
||||
<td class="text-left">{{ mobility_flexibility.elys_test_left }}</td>
|
||||
<td class="text-left">{{ mobility_flexibility.bent_knee_fall_out_test_right }}</td>
|
||||
<td class="text-left">{{ mobility_flexibility.bent_knee_fall_out_test_left }}</td>
|
||||
|
||||
<td class="text-left">{{ mobility_flexibility.shoulder_anteversion_supine_right }}</td>
|
||||
<td class="text-left">{{ mobility_flexibility.shoulder_anteversion_supine_left }}</td>
|
||||
<td class="text-left">{{ mobility_flexibility.shoulder_external_rotation_right }}</td>
|
||||
<td class="text-left">{{ mobility_flexibility.shoulder_external_rotation_left }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p class="muted-text">There are no injury corresponding to your criterias.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footerscript %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#strength_table').tablesorter({
|
||||
headers: {
|
||||
0: { sorter: false }, // disable first column
|
||||
},
|
||||
dateFormat: "uk",
|
||||
sortList: [[1, 1]]
|
||||
});
|
||||
|
||||
$('#strength_table').DataTable({
|
||||
scrollY: 500,
|
||||
paging: false,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
"bInfo": false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
|
@ -72,7 +72,7 @@
|
|||
</div>
|
||||
<div class="card-body pt-0 pb-0 pr-0 pl-0">
|
||||
{% if stability_list %}
|
||||
<table class="table" id="previous_events">
|
||||
<table class="table tablesorter table-striped table-condensed" id="previous_events">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
@ -129,7 +129,7 @@
|
|||
</div>
|
||||
<div class="card-body pt-0 pb-0 pr-0 pl-0">
|
||||
{% if quality_of_movement_list %}
|
||||
<table class="table" id="previous_events">
|
||||
<table class="table tablesorter table-striped table-condensed" id="previous_events">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
@ -188,7 +188,7 @@
|
|||
</div>
|
||||
<div class="card-body pt-0 pb-0 pr-0 pl-0">
|
||||
{% if strength_list %}
|
||||
<table class="table" id="previous_events">
|
||||
<table class="table tablesorter table-striped table-condensed" id="previous_events">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
@ -244,10 +244,53 @@
|
|||
<h4>Mobility & Flexibility</h4>
|
||||
</div>
|
||||
<div class="card-body pt-0 pb-0 pr-0 pl-0">
|
||||
(under construction)
|
||||
{% if mobility_fexibility_list %}
|
||||
<table class="table tablesorter table-striped table-condensed" id="previous_events">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class='header text-left'>Date</th>
|
||||
<th class='header text-center'>???</th>
|
||||
<th class='header text-center'>???</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for mobility_flexibility in mobility_fexibility_list %}
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="{% url 'mobility_flexibility_update' mobility_flexibility.id %}">
|
||||
<span class="tim-icons icon-pencil text-warning"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<a href="{% url 'mobility_flexibility_details' mobility_flexibility.id %}">
|
||||
{{ mobility_flexibility.date | date:"d-m-Y" }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center">{{ mobility_flexibility.quadriceps_left_seated }}</td>
|
||||
<td class="text-center">{{ mobility_flexibility.quadriceps_right_seated }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p class="pl-3 text-muted">No mobility_flexibility recorded for this gymnast.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-footer text-right text-muted pt-0">
|
||||
{% if mobility_fexibility_list %}
|
||||
<a href="{% url 'mobility_flexibility_list_for_gymnast' gymnast_id %}">
|
||||
<button type="submit" value="list" class="btn btn-icon btn-warning mr-2">
|
||||
<i class="far fa-list-alt"></i>
|
||||
</button>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<a href="{% url 'mobility_flexibility_create_for_gymnast' gymnast_id %}">
|
||||
<button type="submit" value="add" class="btn btn-icon btn-warning ">
|
||||
<i class="fas fa-plus"></i>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -24,6 +24,7 @@ from .models import (
|
|||
GymnastHasRoutine,
|
||||
SeasonInformation,
|
||||
NumberOfRoutineDone,
|
||||
MobilityFlexibility,
|
||||
OverheadSquat,
|
||||
DropJump,
|
||||
QualityOfMovement,
|
||||
|
@ -374,6 +375,43 @@ class StrengthAdmin(admin.ModelAdmin):
|
|||
autocomplete_fields = ("gymnast",)
|
||||
|
||||
|
||||
class MobilityFlexibilityAdmin(admin.ModelAdmin):
|
||||
model = MobilityFlexibility
|
||||
|
||||
list_display = (
|
||||
"date",
|
||||
"gymnast",
|
||||
"hip_internal_rotation_right",
|
||||
"hip_internal_rotation_left",
|
||||
"harmstring_aket_right",
|
||||
"harmstring_aket_left",
|
||||
"elys_test_right",
|
||||
"elys_test_left",
|
||||
"bent_knee_fall_out_test_right",
|
||||
"bent_knee_fall_out_test_left",
|
||||
"knee_to_wall_test_right",
|
||||
"knee_to_wall_test_left",
|
||||
"shoulder_anteversion_supine_right",
|
||||
"shoulder_anteversion_supine_left",
|
||||
"shoulder_external_rotation_right",
|
||||
"shoulder_external_rotation_left",
|
||||
"shoulder_internal_rotation_right",
|
||||
"shoulder_internal_rotation_left",
|
||||
"functional_external_rotation_right",
|
||||
"functional_external_rotation_left",
|
||||
"mod_thomas_test_right",
|
||||
"mod_thomas_test_left",
|
||||
"lombo_pelvic_control",
|
||||
"cervical_control",
|
||||
)
|
||||
list_filter = (("gymnast", RelatedDropdownFilter),)
|
||||
search_fields = (
|
||||
"gymnast__firstname",
|
||||
"gymnast__lastname",
|
||||
)
|
||||
autocomplete_fields = ("gymnast",)
|
||||
|
||||
|
||||
admin.site.register(Plan, PlanAdmin)
|
||||
admin.site.register(Note, NoteAdmin)
|
||||
admin.site.register(Point, PointAdmin)
|
||||
|
@ -389,11 +427,12 @@ admin.site.register(InjuryLocation, InjuryLocationAdmin)
|
|||
admin.site.register(SeasonInformation, SeasonInformationAdmin)
|
||||
admin.site.register(GymnastHasRoutine, GymnastHasRoutineAdmin)
|
||||
admin.site.register(NumberOfRoutineDone, NumberOfRoutineDoneAdmin)
|
||||
admin.site.register(MobilityFlexibility, MobilityFlexibilityAdmin)
|
||||
|
||||
admin.site.register(SLBridge, SLBridgeAdmin)
|
||||
admin.site.register(SidePlankLegRaise, SidePlankLegRaiseAdmin)
|
||||
admin.site.register(Stability, StabilityAdmin)
|
||||
admin.site.register(SidePlankLegRaise, SidePlankLegRaiseAdmin)
|
||||
|
||||
admin.site.register(OverheadSquat, OverheadSquatAdmin)
|
||||
admin.site.register(DropJump, DropJumpAdmin)
|
||||
admin.site.register(OverheadSquat, OverheadSquatAdmin)
|
||||
admin.site.register(QualityOfMovement, QualityOfMovementAdmin)
|
||||
|
|
|
@ -16,6 +16,7 @@ from .models import (
|
|||
GymnastHasRoutine,
|
||||
QualityOfMovement,
|
||||
SeasonInformation,
|
||||
MobilityFlexibility,
|
||||
NumberOfRoutineDone,
|
||||
)
|
||||
|
||||
|
|
|
@ -0,0 +1,114 @@
|
|||
# Generated by Django 4.2 on 2023-10-04 09:25
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import ultron.tools.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("people", "0008_alter_gymnast_orientation"),
|
||||
("followup", "0049_strength"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="MobilityFlexibility",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
(
|
||||
"date",
|
||||
models.DateField(
|
||||
default=ultron.tools.models.get_default_date,
|
||||
verbose_name="Date",
|
||||
),
|
||||
),
|
||||
("season", models.CharField(editable=False, max_length=9)),
|
||||
("week_number", models.PositiveSmallIntegerField(editable=False)),
|
||||
(
|
||||
"hip_internal_rotation_right",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"hip_internal_rotation_left",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"harmstring_aket_right",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"harmstring_aket_left",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"elys_test_right",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"elys_test_left",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"bent_knee_fall_out_test_right",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"bent_knee_fall_out_test_left",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"shoulder_anteversion_supine_right",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"shoulder_anteversion_supine_left",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"shoulder_external_rotation_right",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"shoulder_external_rotation_left",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"shoulder_internal_rotation_right",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"shoulder_internal_rotation_left",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"functional_external_rotation_right",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"functional_external_rotation_left",
|
||||
models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
"gymnast",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="mobility_fexibility",
|
||||
to="people.gymnast",
|
||||
),
|
||||
),
|
||||
],
|
||||
options={
|
||||
"verbose_name": "Mobility & Flexibility",
|
||||
"verbose_name_plural": "Mobility & Flexibility",
|
||||
},
|
||||
),
|
||||
]
|
|
@ -0,0 +1,84 @@
|
|||
# Generated by Django 4.2 on 2023-10-05 12:46
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("followup", "0050_mobilityflexibility"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="mobilityflexibility",
|
||||
name="cervical_control",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
choices=[
|
||||
(0, "not evaluated"),
|
||||
(1, "good control, good mobility"),
|
||||
(2, "good control, bad mobility"),
|
||||
(3, "bad control, good mobility"),
|
||||
(4, "bad control, bad mobility"),
|
||||
],
|
||||
default=0,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="mobilityflexibility",
|
||||
name="knee_to_wall_test_left",
|
||||
field=models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="mobilityflexibility",
|
||||
name="knee_to_wall_test_right",
|
||||
field=models.PositiveSmallIntegerField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="mobilityflexibility",
|
||||
name="lombo_pelvic_control",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
choices=[
|
||||
(0, "not evaluated"),
|
||||
(1, "good control, good mobility"),
|
||||
(2, "good control, bad mobility"),
|
||||
(3, "bad control, good mobility"),
|
||||
(4, "bad control, bad mobility"),
|
||||
],
|
||||
default=0,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="mobilityflexibility",
|
||||
name="mod_thomas_test_left",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
choices=[
|
||||
(0, "not evaluated"),
|
||||
(1, "tight psoas"),
|
||||
(2, "tight quadriceps"),
|
||||
(3, "tight TFL"),
|
||||
(4, "tight psoas en quadriceps"),
|
||||
(5, "tight quadriceps en TFL"),
|
||||
(6, "tight psoas en TFL"),
|
||||
(7, "tight psoas en quadriceps en TFL"),
|
||||
],
|
||||
default=0,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="mobilityflexibility",
|
||||
name="mod_thomas_test_right",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
choices=[
|
||||
(0, "not evaluated"),
|
||||
(1, "tight psoas"),
|
||||
(2, "tight quadriceps"),
|
||||
(3, "tight TFL"),
|
||||
(4, "tight psoas en quadriceps"),
|
||||
(5, "tight quadriceps en TFL"),
|
||||
(6, "tight psoas en TFL"),
|
||||
(7, "tight psoas en quadriceps en TFL"),
|
||||
],
|
||||
default=0,
|
||||
),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,29 @@
|
|||
# Generated by Django 4.2 on 2023-10-05 13:07
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("people", "0008_alter_gymnast_orientation"),
|
||||
("followup", "0051_mobilityflexibility_cervical_control_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterUniqueTogether(
|
||||
name="mobilityflexibility",
|
||||
unique_together={("gymnast", "date")},
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name="qualityofmovement",
|
||||
unique_together={("gymnast", "date")},
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name="stability",
|
||||
unique_together={("gymnast", "date")},
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name="strength",
|
||||
unique_together={("gymnast", "date")},
|
||||
),
|
||||
]
|
|
@ -82,6 +82,25 @@ CATEGORY_CHOICES = {
|
|||
25: "B Senior",
|
||||
}
|
||||
|
||||
MOD_THOMAS_TEST_CHOICES = (
|
||||
(0, "not evaluated"),
|
||||
(1, "tight psoas"),
|
||||
(2, "tight quadriceps"),
|
||||
(3, "tight TFL"),
|
||||
(4, "tight psoas en quadriceps"),
|
||||
(5, "tight quadriceps en TFL"),
|
||||
(6, "tight psoas en TFL"),
|
||||
(7, "tight psoas en quadriceps en TFL"),
|
||||
)
|
||||
|
||||
LOMBO_PELVIC_AND_CERVICAL_CONTROL_CHOICES = (
|
||||
(0, "not evaluated"),
|
||||
(1, "good control, good mobility"),
|
||||
(2, "good control, bad mobility"),
|
||||
(3, "bad control, good mobility"),
|
||||
(4, "bad control, bad mobility"),
|
||||
)
|
||||
|
||||
|
||||
class Chrono(Seasonisable):
|
||||
"""
|
||||
|
@ -601,6 +620,7 @@ class Stability(Seasonisable):
|
|||
class Meta:
|
||||
verbose_name = "Stability"
|
||||
verbose_name_plural = "Stabilities"
|
||||
unique_together = ["gymnast", "date"]
|
||||
|
||||
gymnast = models.ForeignKey(
|
||||
Gymnast, on_delete=models.CASCADE, related_name="stabilitytests"
|
||||
|
@ -656,6 +676,7 @@ class QualityOfMovement(Seasonisable):
|
|||
class Meta:
|
||||
verbose_name = "Quality Of Movement"
|
||||
verbose_name_plural = "Qualities Of Movement"
|
||||
unique_together = ["gymnast", "date"]
|
||||
|
||||
gymnast = models.ForeignKey(
|
||||
Gymnast, on_delete=models.CASCADE, related_name="qualities_of_movement"
|
||||
|
@ -683,6 +704,7 @@ class Strength(Seasonisable):
|
|||
class Meta:
|
||||
verbose_name = "Strength"
|
||||
verbose_name_plural = "Strength"
|
||||
unique_together = ["gymnast", "date"]
|
||||
|
||||
gymnast = models.ForeignKey(
|
||||
Gymnast, on_delete=models.CASCADE, related_name="strength"
|
||||
|
@ -702,3 +724,51 @@ class Strength(Seasonisable):
|
|||
|
||||
def __str__(self):
|
||||
return f"{self.gymnast} - {self.date}"
|
||||
|
||||
|
||||
class MobilityFlexibility(Seasonisable):
|
||||
"""Classe représentant les tests de Mobilité et flexibilité (Mobility and Flexibility)"""
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Mobility & Flexibility"
|
||||
verbose_name_plural = "Mobility & Flexibility"
|
||||
unique_together = ["gymnast", "date"]
|
||||
|
||||
gymnast = models.ForeignKey(
|
||||
Gymnast, on_delete=models.CASCADE, related_name="mobility_fexibility"
|
||||
)
|
||||
|
||||
hip_internal_rotation_right = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
hip_internal_rotation_left = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
harmstring_aket_right = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
harmstring_aket_left = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
elys_test_right = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
elys_test_left = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
bent_knee_fall_out_test_right = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
bent_knee_fall_out_test_left = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
knee_to_wall_test_right = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
knee_to_wall_test_left = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
shoulder_anteversion_supine_right = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
shoulder_anteversion_supine_left = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
shoulder_external_rotation_right = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
shoulder_external_rotation_left = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
shoulder_internal_rotation_right = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
shoulder_internal_rotation_left = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
functional_external_rotation_right = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
functional_external_rotation_left = models.PositiveSmallIntegerField(null=True, blank=True)
|
||||
|
||||
mod_thomas_test_right = models.PositiveSmallIntegerField(
|
||||
choices=MOD_THOMAS_TEST_CHOICES, default=0
|
||||
)
|
||||
mod_thomas_test_left = models.PositiveSmallIntegerField(
|
||||
choices=MOD_THOMAS_TEST_CHOICES, default=0
|
||||
)
|
||||
lombo_pelvic_control = models.PositiveSmallIntegerField(
|
||||
choices=LOMBO_PELVIC_AND_CERVICAL_CONTROL_CHOICES, default=0
|
||||
)
|
||||
cervical_control = models.PositiveSmallIntegerField(
|
||||
choices=LOMBO_PELVIC_AND_CERVICAL_CONTROL_CHOICES, default=0
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.gymnast} - {self.date}"
|
||||
|
|
|
@ -162,7 +162,7 @@ urlpatterns = [
|
|||
),
|
||||
#
|
||||
#
|
||||
# Strength
|
||||
# STRENGTH
|
||||
path(r"strength/", views.strength_listing, name="strength_list"),
|
||||
path(
|
||||
r"strength/gymnast/<int:gymnast_id>/",
|
||||
|
@ -187,6 +187,31 @@ urlpatterns = [
|
|||
),
|
||||
#
|
||||
#
|
||||
# MOBILITY/FLEXIBILITY
|
||||
path(r"mobility/", views.strength_listing, name="mobility_flexibility_list"),
|
||||
path(
|
||||
r"mobility/gymnast/<int:gymnast_id>/",
|
||||
views.mobility_flexibility_listing,
|
||||
name="mobility_flexibility_list_for_gymnast"
|
||||
),
|
||||
path(r"mobility/add/", views.mobility_flexibility_create_or_update, name="mobility_flexibility_create"),
|
||||
path(
|
||||
r"mobility/add/<int:gymnast_id>/",
|
||||
views.mobility_flexibility_create_or_update,
|
||||
name="mobility_flexibility_create_for_gymnast",
|
||||
),
|
||||
path(
|
||||
r"mobility/edit/<int:mobility_flexibility_id>/",
|
||||
views.mobility_flexibility_create_or_update,
|
||||
name="mobility_flexibility_update",
|
||||
),
|
||||
path(
|
||||
r"mobility/<int:mobility_flexibility_id>/",
|
||||
views.mobility_flexibility_detail,
|
||||
name="mobility_flexibility_details"
|
||||
),
|
||||
#
|
||||
#
|
||||
# HEIGH/WEIGHT
|
||||
path(
|
||||
r"heightweight/gymnast/<int:gymnast_id>/",
|
||||
|
|
|
@ -38,6 +38,7 @@ from .forms import (
|
|||
WellBeingForm,
|
||||
HeightWeightForm,
|
||||
LearnedSkillForm,
|
||||
MobilityFlexibility,
|
||||
QualityOfMovementForm,
|
||||
SeasonInformationForm,
|
||||
NumberOfRoutineDoneForm,
|
||||
|
@ -949,3 +950,68 @@ def strength_create_or_update(request, strength_id=None, gymnast_id=None):
|
|||
form = StrengthForm(instance=strength, initial=data)
|
||||
context = {"form": form, "strength_id": strength_id}
|
||||
return render(request, "followup/strength/create.html", context)
|
||||
|
||||
|
||||
@login_required
|
||||
@require_http_methods(["GET"])
|
||||
def mobility_flexibility_listing(request, gymnast_id=None):
|
||||
"""Liste toutes les records de la table Quality of Movement"""
|
||||
|
||||
if gymnast_id is not None:
|
||||
gymnast = Gymnast.objects.get(pk=gymnast_id)
|
||||
mobility_flexibility_list = MobilityFlexibility.objects.filter(gymnast=gymnast_id)
|
||||
else:
|
||||
mobility_flexibility_list = MobilityFlexibility.objects.all()
|
||||
gymnast = None
|
||||
|
||||
context = {"mobility_flexibility_list": mobility_flexibility_list, "gymnast": gymnast}
|
||||
return render(request, "followup/mobility_flexibility/list.html", context)
|
||||
|
||||
|
||||
@login_required
|
||||
@require_http_methods(["GET"])
|
||||
def mobility_flexibility_detail(request, mobility_flexibility_id):
|
||||
"""
|
||||
Récupère toutes les informations d'une Quality of Movement.
|
||||
"""
|
||||
mobility_flexibility = get_object_or_404(MobilityFlexibility, pk=mobility_flexibility_id)
|
||||
|
||||
context = {
|
||||
"mobility_flexibility": mobility_flexibility,
|
||||
}
|
||||
return render(request, "followup/mobility_flexibility/details.html", context)
|
||||
|
||||
|
||||
@login_required
|
||||
@require_http_methods(["GET", "POST"])
|
||||
def mobility_flexibility_create_or_update(request, strength_id=None, gymnast_id=None):
|
||||
pass
|
||||
# """
|
||||
# Récupère toutes les informations d'une stability.
|
||||
# """
|
||||
# if strength_id:
|
||||
# strength = get_object_or_404(Strength, pk=strength_id)
|
||||
# data = {
|
||||
# "gymnast_related": strength.gymnast,
|
||||
# }
|
||||
# else:
|
||||
# strength = None
|
||||
# data = None
|
||||
# if gymnast_id is not None:
|
||||
# gymnast = get_object_or_404(Gymnast, pk=gymnast_id)
|
||||
# data = {"gymnast": gymnast_id, "gymnast_related": str(gymnast)}
|
||||
|
||||
# if request.method == "POST":
|
||||
# form = StrengthForm(request.POST, instance=strength)
|
||||
|
||||
# if form.is_valid():
|
||||
# strength = form.save()
|
||||
# return HttpResponseRedirect(
|
||||
# reverse("strength_details", args=(strength.pk,))
|
||||
# )
|
||||
# else:
|
||||
# return render(request, "followup/strength/create.html", {"form": form})
|
||||
|
||||
# form = StrengthForm(instance=strength, initial=data)
|
||||
# context = {"form": form, "strength_id": strength_id}
|
||||
# return render(request, "followup/strength/create.html", context)
|
||||
|
|
|
@ -37,8 +37,9 @@ from ultron.followup.models import (
|
|||
LearnedSkill,
|
||||
HeightWeight,
|
||||
SeasonInformation,
|
||||
NumberOfRoutineDone,
|
||||
QualityOfMovement,
|
||||
MobilityFlexibility,
|
||||
NumberOfRoutineDone,
|
||||
)
|
||||
|
||||
from ultron.followup.models import (
|
||||
|
@ -256,6 +257,7 @@ def gymnast_display_physiological(request, gymnast_id):
|
|||
stability_list = Stability.objects.filter(gymnast=gymnast_id).order_by("date")[:10]
|
||||
quality_of_movement_list = QualityOfMovement.objects.filter(gymnast=gymnast_id).order_by("date")[:10]
|
||||
strength_list = Strength.objects.filter(gymnast=gymnast_id).order_by("date")[:10]
|
||||
mobility_fexibility_list = MobilityFlexibility.objects.filter(gymnast=gymnast_id).order_by("date")[:10]
|
||||
|
||||
context = {
|
||||
"injuries_list": injuries_list,
|
||||
|
@ -264,6 +266,7 @@ def gymnast_display_physiological(request, gymnast_id):
|
|||
"height_weight_list": height_weight_list,
|
||||
"quality_of_movement_list": quality_of_movement_list,
|
||||
"strength_list": strength_list,
|
||||
"mobility_fexibility_list": mobility_fexibility_list,
|
||||
"gymnast_id": gymnast_id,
|
||||
}
|
||||
return render(request, "people/gymnasts/tabs/tab_physiological.html", context)
|
||||
|
|
Loading…
Reference in New Issue