Added field registration_required.

This commit is contained in:
2018-02-26 17:57:07 +01:00
parent 31e1adf2b8
commit 1210d8f534
8 changed files with 85 additions and 51 deletions

View File

@@ -131,13 +131,6 @@ class Event(models.Model):
pre_meeting_2 = models.DateTimeField(blank=True,
null=True)
# RegistrationForm
min_participants = models.IntegerField(default=0)
max_participants = models.IntegerField(default=0)
deadline = models.DateField(blank=True,
null=True)
registration_howto = models.TextField(blank=True)
# TrainerForm
trainer_firstname = models.CharField(max_length=config.TRAINER_NAME_MAX_LENGTH,
blank=True)
@@ -157,6 +150,14 @@ class Event(models.Model):
trainer_3_phone = models.CharField(max_length=config.PHONE_NUMBER_MAX_LENGTH,
blank=True)
# RegistrationForm
min_participants = models.IntegerField(default=0)
max_participants = models.IntegerField(default=0)
registration_required = models.BooleanField(default=False)
deadline = models.DateField(blank=True,
null=True)
registration_howto = models.TextField(blank=True)
# ChargesForm
charge = models.FloatField(default=0)
additional_costs = models.CharField(max_length=config.ADDITIONAL_COSTS_MAX_LENGTH,
@@ -381,9 +382,10 @@ class Event(models.Model):
'event': self,
'status': self.get_status(),
'number': self.get_number(),
'title': self.title,
'description': self.description,
'mode': self.mode,
'sport': self.sport,
'title': self.title,
'first_day': self.first_day,
'last_day': self.last_day,
'normalized_date': self.get_formated_date(format='normalized'),
@@ -394,7 +396,6 @@ class Event(models.Model):
'alt_normalized_date': self.get_alt_formated_date(format='normalized'),
'alt_normalized_long_date': self.get_alt_formated_date(format='normalized_long'),
'alt_normalized_short_date': self.get_alt_formated_date(format='normalized_short'),
'description': self.description,
'course_topic_1': self.course_topic_1,
'course_topic_2': self.course_topic_2,
'course_topic_3': self.course_topic_3,
@@ -409,25 +410,20 @@ class Event(models.Model):
'course_goal_6': self.course_goal_6,
'country': self.country,
'location': self.location,
'basecamp': self.basecamp,
'accommodation': self.accommodation,
'accommodation_other': self.accommodation_other,
'meals': self.meals,
'meals_other': self.meals_other,
'transport': self.transport,
'transport_other': self.transport_other,
'meeting_time': self.meeting_time,
'meeting_point': self.meeting_point,
'meeting_point_other': self.meeting_point_other,
'basecamp': self.basecamp,
'accommodation': self.accommodation,
'accommodation_other': self.accommodation_other,
'meals': self.meals,
'meals_other': self.meals_other,
'requirements': self.requirements,
'equipment': self.equipment,
'pre_meeting_1': self.pre_meeting_1,
'pre_meeting_2': self.pre_meeting_2,
'deadline': self.deadline,
'min_participants': self.min_participants,
'max_participants': self.max_participants,
'charge': self.charge,
'additional_costs': self.additional_costs,
'trainer_firstname': self.trainer_firstname,
'trainer_familyname': self.trainer_familyname,
'trainer_email': self.trainer_email,
@@ -438,7 +434,13 @@ class Event(models.Model):
'trainer_3_fullname': self.trainer_3_fullname,
'trainer_3_email': self.trainer_3_email,
'trainer_3_phone': self.trainer_3_phone,
'min_participants': self.min_participants,
'max_participants': self.max_participants,
'registration_required': self.registration_required,
'deadline': self.deadline,
'registration_howto': self.registration_howto,
'charge': self.charge,
'additional_costs': self.additional_costs,
'planned_publication_date': self.planned_publication_date,
'internal_note': self.internal_note,
}