add video fields on event model, fix #82

This commit is contained in:
Stephan Telling 2017-02-23 21:51:36 +01:00
parent 999c7e971b
commit d06f2355de
No known key found for this signature in database
GPG key ID: C07DFD6208200C9D
3 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-22 15:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('program', '0023_auto_20170218_1243'),
]
operations = [
migrations.AddField(
model_name='event',
name='video_recording',
field=models.BooleanField(default=True, help_text='Whether the event will be video recorded.'),
),
migrations.AddField(
model_name='event',
name='video_url',
field=models.URLField(blank=True, help_text='URL to the recording.', max_length=1000, null=True),
),
]

View file

@ -2,6 +2,7 @@ from django.contrib.postgres.fields import DateTimeRangeField
from django.db import models from django.db import models
from django.utils.text import slugify from django.utils.text import slugify
from django.conf import settings from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from utils.models import CreatedUpdatedModel from utils.models import CreatedUpdatedModel
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from datetime import timedelta from datetime import timedelta
@ -41,6 +42,17 @@ class Event(CreatedUpdatedModel):
event_type = models.ForeignKey(EventType) event_type = models.ForeignKey(EventType)
camp = models.ForeignKey('camps.Camp', null=True, related_name="events") camp = models.ForeignKey('camps.Camp', null=True, related_name="events")
video_url = models.URLField(
max_length=1000,
null=True,
blank=True,
help_text=_('URL to the recording.')
)
video_recording = models.BooleanField(
default=True,
help_text=_('Whether the event will be video recorded or not.')
)
class Meta: class Meta:
ordering = ['title'] ordering = ['title']
unique_together = (('camp', 'slug'), ('camp', 'title')) unique_together = (('camp', 'slug'), ('camp', 'title'))

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-22 15:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shop', '0034_auto_20170131_1849'),
]
operations = [
migrations.AlterField(
model_name='order',
name='customer_comment',
field=models.TextField(blank=True, default='', help_text='If you have any comments about the order please enter them here.', verbose_name='Customer comment'),
),
]