diff --git a/chrono/agendas/migrations/0036_auto_20191223_1758.py b/chrono/agendas/migrations/0036_auto_20191223_1758.py new file mode 100644 index 00000000..00a67177 --- /dev/null +++ b/chrono/agendas/migrations/0036_auto_20191223_1758.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.17 on 2019-12-23 17:58 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('agendas', '0035_remove_desk_timeperiod_exceptions_remote_url'), + ] + + operations = [ + migrations.AddField( + model_name='event', + name='pricing', + field=models.CharField(blank=True, max_length=150, null=True, verbose_name='Pricing'), + ), + migrations.AddField( + model_name='event', + name='url', + field=models.CharField(blank=True, max_length=200, null=True, verbose_name='URL'), + ), + ] diff --git a/chrono/agendas/models.py b/chrono/agendas/models.py index 2b745556..e4e85007 100644 --- a/chrono/agendas/models.py +++ b/chrono/agendas/models.py @@ -312,6 +312,8 @@ class Event(models.Model): description = models.TextField( _('Description'), null=True, blank=True, help_text=_('Optional event description.') ) + pricing = models.CharField(_('Pricing'), max_length=150, null=True, blank=True) + url = models.CharField(_('URL'), max_length=200, null=True, blank=True) full = models.BooleanField(default=False) meeting_type = models.ForeignKey(MeetingType, null=True, on_delete=models.CASCADE) desk = models.ForeignKey('Desk', null=True, on_delete=models.CASCADE) @@ -392,6 +394,8 @@ class Event(models.Model): 'label': self.label, 'slug': self.slug, 'description': self.description, + 'url': self.url, + 'pricing': self.pricing, } diff --git a/chrono/api/views.py b/chrono/api/views.py index c05bb710..2eaec494 100644 --- a/chrono/api/views.py +++ b/chrono/api/views.py @@ -229,6 +229,8 @@ class Datetimes(APIView): 'text': force_text(x), 'datetime': format_response_datetime(x.start_datetime), 'description': x.description, + 'pricing': x.pricing, + 'url': x.url, 'disabled': bool(x.full), 'api': { 'fillslot_url': request.build_absolute_uri( diff --git a/chrono/manager/templates/chrono/manager_event_detail.html b/chrono/manager/templates/chrono/manager_event_detail.html index f533e8a3..b45a0fb9 100644 --- a/chrono/manager/templates/chrono/manager_event_detail.html +++ b/chrono/manager/templates/chrono/manager_event_detail.html @@ -24,9 +24,13 @@ {% block content %} -{% if object.description %} +{% if object.description or object.pricing or object.url %}
{{ object.description }}
{{ object.description }}
{% endif %} + {% if object.pricing %}{% trans "Pricing:" %} {{ object.pricing }}
{% endif %} + {% if object.url %}{{ object.url|truncatechars:100 }}{% endif %} +