Split ApproachForm, full featured display of transport/journey settings.

This commit is contained in:
2018-02-27 15:59:12 +01:00
parent b97869d690
commit 5d8faa615e
13 changed files with 404 additions and 223 deletions

View File

@@ -75,42 +75,35 @@ class Event(models.Model):
alt_last_day = models.DateField(blank=True,
null=True)
# TrainingForm
course_topic_1 = models.TextField(blank=True)
course_topic_2 = models.TextField(blank=True)
course_topic_3 = models.TextField(blank=True)
course_topic_4 = models.TextField(blank=True)
course_topic_5 = models.TextField(blank=True)
course_topic_6 = models.TextField(blank=True)
course_goal_1 = models.TextField(blank=True)
course_goal_2 = models.TextField(blank=True)
course_goal_3 = models.TextField(blank=True)
course_goal_4 = models.TextField(blank=True)
course_goal_5 = models.TextField(blank=True)
course_goal_6 = models.TextField(blank=True)
# LocationForm
country = CountryField(countries=choices.CountryChoiceSet)
terrain = models.CharField(max_length=choices.CHOICE_FIELD_MAX_LENGTH,
choices=choices.TERRAIN_CHOICES)
location = models.CharField(max_length=config.LOCATION_MAX_LENGTH,
blank=True)
# ApproachForm
transport = models.CharField(max_length=choices.CHOICE_FIELD_MAX_LENGTH,
choices=choices.TRANSPORT_CHOICES)
transport_other = models.CharField(max_length=config.TRANSPORT_OTHER_MAX_LENGTH,
blank=True)
# JourneyForm
meeting_point = models.CharField(max_length=choices.CHOICE_FIELD_MAX_LENGTH,
choices=choices.MEETING_POINT_CHOICES)
meeting_point_other = models.CharField(max_length=config.MEETING_POINT_OTHER_MAX_LENGTH,
blank=True)
meeting_time = models.TimeField(blank=True,
null=True)
departure_time = models.TimeField(blank=True,
null=True)
departure_ride = models.CharField(max_length=config.DEPARTURE_RIDE_MAX_LENGTH,
blank=True)
return_departure_time = models.TimeField(blank=True,
null=True)
return_arrival_time = models.TimeField(blank=True,
null=True)
arrival_previous_day = models.BooleanField(default=False)
return_time = models.TimeField(blank=True,
null=True)
# AccommodationForm
basecamp = models.CharField(max_length=config.BASECAMP_MAX_LENGTH,
blank=True)
@@ -163,6 +156,20 @@ class Event(models.Model):
additional_costs = models.CharField(max_length=config.ADDITIONAL_COSTS_MAX_LENGTH,
blank=True)
# TrainingForm
course_topic_1 = models.TextField(blank=True)
course_topic_2 = models.TextField(blank=True)
course_topic_3 = models.TextField(blank=True)
course_topic_4 = models.TextField(blank=True)
course_topic_5 = models.TextField(blank=True)
course_topic_6 = models.TextField(blank=True)
course_goal_1 = models.TextField(blank=True)
course_goal_2 = models.TextField(blank=True)
course_goal_3 = models.TextField(blank=True)
course_goal_4 = models.TextField(blank=True)
course_goal_5 = models.TextField(blank=True)
course_goal_6 = models.TextField(blank=True)
# SummaryForm
planned_publication_date = models.DateField(blank=True,
null=True)
@@ -333,7 +340,7 @@ class Event(models.Model):
year_fmt = ' yy'
else:
weekday_fmt = 'EEEE, '
day_fmt = 'd.'
day_fmt = 'dd.'
month_fmt = ' MMMM'
year_fmt = ' yyyy'
@@ -396,25 +403,17 @@ 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'),
'course_topic_1': self.course_topic_1,
'course_topic_2': self.course_topic_2,
'course_topic_3': self.course_topic_3,
'course_topic_4': self.course_topic_4,
'course_topic_5': self.course_topic_5,
'course_topic_6': self.course_topic_6,
'course_goal_1': self.course_goal_1,
'course_goal_2': self.course_goal_2,
'course_goal_3': self.course_goal_3,
'course_goal_4': self.course_goal_4,
'course_goal_5': self.course_goal_5,
'course_goal_6': self.course_goal_6,
'country': self.country,
'location': self.location,
'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,
'meeting_time': self.meeting_time,
'departure_time': self.departure_time,
'departure_ride': self.departure_ride,
'return_departure_time': self.return_departure_time,
'return_arrival_time': self.return_arrival_time,
'basecamp': self.basecamp,
'accommodation': self.accommodation,
'accommodation_other': self.accommodation_other,
@@ -441,6 +440,18 @@ class Event(models.Model):
'registration_howto': self.registration_howto,
'charge': self.charge,
'additional_costs': self.additional_costs,
'course_topic_1': self.course_topic_1,
'course_topic_2': self.course_topic_2,
'course_topic_3': self.course_topic_3,
'course_topic_4': self.course_topic_4,
'course_topic_5': self.course_topic_5,
'course_topic_6': self.course_topic_6,
'course_goal_1': self.course_goal_1,
'course_goal_2': self.course_goal_2,
'course_goal_3': self.course_goal_3,
'course_goal_4': self.course_goal_4,
'course_goal_5': self.course_goal_5,
'course_goal_6': self.course_goal_6,
'planned_publication_date': self.planned_publication_date,
'internal_note': self.internal_note,
}