Update Injury and Intensity models
This commit is contained in:
parent
df6a3116c9
commit
08e2703329
|
@ -0,0 +1,71 @@
|
||||||
|
# Generated by Django 4.2 on 2023-10-18 10:48
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("followup", "0057_injury"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name="intensity",
|
||||||
|
unique_together=set(),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="injury",
|
||||||
|
name="injury_type",
|
||||||
|
field=models.SmallIntegerField(
|
||||||
|
choices=[
|
||||||
|
(0, "Abrasion"),
|
||||||
|
(1, "Dental Injury"),
|
||||||
|
(2, "Dislocation / Subluxation"),
|
||||||
|
(3, "Fracture"),
|
||||||
|
(4, "Haematoma / Contusion / Bruise"),
|
||||||
|
(5, "Head Concussion"),
|
||||||
|
(6, "Laceration"),
|
||||||
|
(7, "Lesion of Meniscus or Cartilage"),
|
||||||
|
(8, "Muscle Rupture /Strain / Tear / Cramps"),
|
||||||
|
(9, "Nerve Injury"),
|
||||||
|
(10, "Other Bone Injury"),
|
||||||
|
(11, "Sprain / Ligament Injury"),
|
||||||
|
(12, "Tendon Injury / Rupture / Tendinosis / Bursitis"),
|
||||||
|
],
|
||||||
|
verbose_name="Type",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="injury",
|
||||||
|
name="location",
|
||||||
|
field=models.SmallIntegerField(
|
||||||
|
choices=[
|
||||||
|
(0, "Abdomen"),
|
||||||
|
(1, "Ankle"),
|
||||||
|
(2, "Elbow"),
|
||||||
|
(3, "Foot / Toe"),
|
||||||
|
(4, "Hand / Finger / Thumb"),
|
||||||
|
(5, "Head / Face"),
|
||||||
|
(6, "Hip / Groin"),
|
||||||
|
(7, "Knee"),
|
||||||
|
(8, "Low back / Sacrum / Pelvis"),
|
||||||
|
(9, "Lower Leg / Achilles Tendon"),
|
||||||
|
(10, "Neck / Cervical Spine"),
|
||||||
|
(11, "Shoulder / Clavicula"),
|
||||||
|
(12, "Sternum / Ribs / Upper back"),
|
||||||
|
(13, "Thigh"),
|
||||||
|
(14, "Upper arm"),
|
||||||
|
(15, "Wrist"),
|
||||||
|
],
|
||||||
|
verbose_name="Location",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="injury",
|
||||||
|
name="mechanism",
|
||||||
|
field=models.PositiveSmallIntegerField(
|
||||||
|
choices=[(0, "Overuse"), (1, "Trauma")], verbose_name="Mechanism"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -559,7 +559,7 @@ class Intensity(Markdownizable, Seasonisable):
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = "Intensity"
|
verbose_name = "Intensity"
|
||||||
verbose_name_plural = "Intensities"
|
verbose_name_plural = "Intensities"
|
||||||
unique_together = ("gymnast", "date")
|
# unique_together = ("gymnast", "date")
|
||||||
|
|
||||||
gymnast = models.ForeignKey(
|
gymnast = models.ForeignKey(
|
||||||
Gymnast, on_delete=models.CASCADE, related_name="intensities"
|
Gymnast, on_delete=models.CASCADE, related_name="intensities"
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
paging: false,
|
paging: false,
|
||||||
searching: false,
|
searching: false,
|
||||||
ordering: false,
|
ordering: false,
|
||||||
// "bInfo" : false,
|
"bInfo": false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="card-body pb-0">
|
<div class="card-body pb-0">
|
||||||
<div class="table-responsive pb-0">
|
<div class="table-responsive pb-0">
|
||||||
{% if club_list %}
|
{% if club_list %}
|
||||||
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="maintable">
|
<table class="table tablesorter table-striped table-condensed" data-sort="table" id="club_table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="header text-left" style="width: 35%">Name</th>
|
<th class="header text-left" style="width: 35%">Name</th>
|
||||||
|
@ -27,11 +27,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<table class="table">
|
There are no places corresponding to your criterias.
|
||||||
<tr>
|
|
||||||
<td>There are no places corresponding to your criterias</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,7 +43,11 @@
|
||||||
},
|
},
|
||||||
dateFormat: "uk",
|
dateFormat: "uk",
|
||||||
sortList: [[3,0], [1,0]]
|
sortList: [[3,0], [1,0]]
|
||||||
})
|
});
|
||||||
|
|
||||||
|
$('#club_table').DataTable({
|
||||||
|
"bInfo": false,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -22,7 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive pb-0">
|
||||||
{% if place_list %}
|
{% if place_list %}
|
||||||
<table class="table tablesorter table-striped" data-sort="table" id="place_table">
|
<table class="table tablesorter table-striped" data-sort="table" id="place_table">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
paging: false,
|
paging: false,
|
||||||
searching: false,
|
searching: false,
|
||||||
ordering: false,
|
ordering: false,
|
||||||
// "bInfo" : false,
|
"bInfo": false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
paging: false,
|
paging: false,
|
||||||
searching: false,
|
searching: false,
|
||||||
ordering: false,
|
ordering: false,
|
||||||
// "bInfo" : false,
|
"bInfo": false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue