diff --git a/systers_portal/meetup/forms.py b/systers_portal/meetup/forms.py index 91ff23d2..d2350269 100644 --- a/systers_portal/meetup/forms.py +++ b/systers_portal/meetup/forms.py @@ -91,9 +91,11 @@ class AddMeetupForm(ModelFormWithHelper): """ class Meta: model = Meetup - fields = ('title', 'slug', 'date', 'time', 'venue', 'description') + fields = ('title', 'slug', 'date', 'end_date', 'time', 'end_time', 'venue', 'description') widgets = {'date': forms.DateInput(attrs={'type': 'text', 'class': 'datepicker'}), - 'time': forms.TimeInput(attrs={'type': 'text', 'class': 'timepicker'})} + 'end_date': forms.DateInput(attrs={'type': 'text', 'class': 'datepicker'}), + 'time': forms.TimeInput(attrs={'type': 'text', 'class': 'timepicker'}), + 'end_time': forms.TimeInput(attrs={'type': 'text', 'class': 'timepicker'})} helper_class = SubmitCancelFormHelper helper_cancel_href = "{% url 'about_meetup_location' meetup_location.slug %}" diff --git a/systers_portal/meetup/models.py b/systers_portal/meetup/models.py index 908ef424..9fd6f64c 100644 --- a/systers_portal/meetup/models.py +++ b/systers_portal/meetup/models.py @@ -92,9 +92,9 @@ class Meetup(models.Model): title = models.CharField(max_length=50, verbose_name="Title",) slug = models.SlugField(max_length=50, unique=True, verbose_name="Slug") date = models.DateField(verbose_name="Date") - end_date = models.DateField(verbose_name="End Date", null=True) - time = models.TimeField(verbose_name="Time", blank=True) - end_time = models.TimeField(verbose_name="End Time", null=True) + end_date = models.DateField(verbose_name="End Date", blank=True) + time = models.TimeField(verbose_name="Time") + end_time = models.TimeField(verbose_name="End Time", blank=True) venue = models.CharField(max_length=512, verbose_name="Venue", blank=True) description = models.TextField(verbose_name="Description") meetup_location = models.ForeignKey(MeetupLocation, verbose_name="Meetup Location") diff --git a/systers_portal/templates/meetup/meetup.html b/systers_portal/templates/meetup/meetup.html index 28bb404f..f5bdb0e0 100644 --- a/systers_portal/templates/meetup/meetup.html +++ b/systers_portal/templates/meetup/meetup.html @@ -3,10 +3,16 @@ {% block meetup_location_page_content %}

{{ meetup.title }}

-

+

Date: {{ meetup.date }} -     + {% if meetup.end_date %} + EndDate: {{ meetup.end_date }} + {% endif %} +     Time: {{ meetup.time|time:"H:i" }} + {% if meetup.end_time %} + Time: {{ meetup.end_time|time:"H:i" }} + {% endif %}

Venue: {{ meetup.venue }} @@ -27,7 +33,7 @@

{{ meetup.title }}

{{ not_coming_no }} - +
{% include 'meetup/snippets/share_buttons.html' %}