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:
|
||||
verbose_name = "Intensity"
|
||||
verbose_name_plural = "Intensities"
|
||||
unique_together = ("gymnast", "date")
|
||||
# unique_together = ("gymnast", "date")
|
||||
|
||||
gymnast = models.ForeignKey(
|
||||
Gymnast, on_delete=models.CASCADE, related_name="intensities"
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
paging: false,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
// "bInfo" : false,
|
||||
"bInfo": false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<div class="card-body pb-0">
|
||||
<div class="table-responsive pb-0">
|
||||
{% 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>
|
||||
<tr>
|
||||
<th class="header text-left" style="width: 35%">Name</th>
|
||||
|
@ -27,11 +27,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>There are no places corresponding to your criterias</td>
|
||||
</tr>
|
||||
</table>
|
||||
There are no places corresponding to your criterias.
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -47,7 +43,11 @@
|
|||
},
|
||||
dateFormat: "uk",
|
||||
sortList: [[3,0], [1,0]]
|
||||
})
|
||||
});
|
||||
|
||||
$('#club_table').DataTable({
|
||||
"bInfo": false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
|
@ -22,7 +22,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<div class="table-responsive pb-0">
|
||||
{% if place_list %}
|
||||
<table class="table tablesorter table-striped" data-sort="table" id="place_table">
|
||||
<thead>
|
||||
|
@ -83,7 +83,7 @@
|
|||
paging: false,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
// "bInfo" : false,
|
||||
"bInfo": false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -75,12 +75,12 @@
|
|||
})
|
||||
|
||||
$('#skill_table').DataTable({
|
||||
scrollY: 500,
|
||||
scrollY: 500,
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
// "bInfo" : false,
|
||||
paging: false,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
"bInfo": false,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue