From 29eec2e85bb41c721d169b19239c68b2d9c87463 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Mon, 20 Feb 2017 18:46:43 +0100 Subject: [PATCH] visit doesn't have type field --- smash/web/models.py | 13 ------------- smash/web/templates/visits/index.html | 8 ++------ smash/web/tests/test_VisitAddForm.py | 1 - 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/smash/web/models.py b/smash/web/models.py index c5b2915b..820bce3b 100644 --- a/smash/web/models.py +++ b/smash/web/models.py @@ -173,19 +173,6 @@ class Visit(models.Model): verbose_name='Visit ends at' ) # Deadline before which all appointments need to be scheduled - TYPE_CHOICES_LEVEL_A_VISIT = 'A' - TYPE_CHOICES_LEVEL_B_VISIT = 'B' - TYPE_CHOICES_OTHER = 'O' - - TYPE_CHOICES = ( - (TYPE_CHOICES_LEVEL_A_VISIT, 'Level A visit'), - (TYPE_CHOICES_LEVEL_B_VISIT, 'Level B visit'), - (TYPE_CHOICES_OTHER, 'Other') - ) - visit_type = models.CharField(max_length=1, choices=TYPE_CHOICES, - verbose_name='Visit type', - default='O' - ) is_finished = models.BooleanField( verbose_name='Has ended', default=False diff --git a/smash/web/templates/visits/index.html b/smash/web/templates/visits/index.html index adb835d2..65a47aea 100644 --- a/smash/web/templates/visits/index.html +++ b/smash/web/templates/visits/index.html @@ -41,8 +41,7 @@ <th>Full information</th> <th>Visit begins</th> <th>Visit ends</th> - <th>Visit type</th> - <th>Finished?</th> + <th>Finished?</th> </tr> </thead> <tbody> @@ -58,10 +57,7 @@ <td> {{ visit.datetime_end }} </td> - <td> - {{ visit.get_visit_type_display }} - </td> - <td> + <td> {% if visit.is_finished %}<button type="button" class="btn btn-block btn-success">YES</button> {% else %}<button type="button" class="btn btn-block btn-danger">NO</button> {% endif %} diff --git a/smash/web/tests/test_VisitAddForm.py b/smash/web/tests/test_VisitAddForm.py index 9a35892b..83ba6a8b 100644 --- a/smash/web/tests/test_VisitAddForm.py +++ b/smash/web/tests/test_VisitAddForm.py @@ -16,7 +16,6 @@ class SubjectAddFormTests(TestCase): self.sample_data = {'datetime_begin': "2017-01-01", 'datetime_end': "2017-02-02", - 'visit_type': Visit.TYPE_CHOICES_OTHER, 'subject' : self.subject.id } -- GitLab