add video fields on event model, fix #82
This commit is contained in:
parent
999c7e971b
commit
d06f2355de
25
src/program/migrations/0024_auto_20170222_1629.py
Normal file
25
src/program/migrations/0024_auto_20170222_1629.py
Normal 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),
|
||||
),
|
||||
]
|
|
@ -2,6 +2,7 @@ from django.contrib.postgres.fields import DateTimeRangeField
|
|||
from django.db import models
|
||||
from django.utils.text import slugify
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from utils.models import CreatedUpdatedModel
|
||||
from django.core.exceptions import ValidationError
|
||||
from datetime import timedelta
|
||||
|
@ -41,6 +42,17 @@ class Event(CreatedUpdatedModel):
|
|||
event_type = models.ForeignKey(EventType)
|
||||
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:
|
||||
ordering = ['title']
|
||||
unique_together = (('camp', 'slug'), ('camp', 'title'))
|
||||
|
|
20
src/shop/migrations/0035_auto_20170222_1629.py
Normal file
20
src/shop/migrations/0035_auto_20170222_1629.py
Normal 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'),
|
||||
),
|
||||
]
|
Loading…
Reference in a new issue