Commit 06aecf6c authored by fred's avatar fred
Browse files

adjust for 2.2

parent f2ccfd39
......@@ -25,8 +25,11 @@ class Migration(migrations.Migration):
('slug', models.SlugField(verbose_name='Slug', blank=True)),
('public', models.BooleanField(default=True, verbose_name='Public')),
('groups', models.ManyToManyField(to='auth.Group', verbose_name='Groups', blank=True)),
('page', models.ForeignKey(to='data.Page')),
('soundfile', models.ForeignKey(to='emissions.SoundFile', null=True)),
('page', models.ForeignKey(to='data.Page', on_delete=models.SET_NULL)),
(
'soundfile',
models.ForeignKey(to='emissions.SoundFile', null=True, on_delete=models.SET_NULL),
),
],
options={
'verbose_name': 'Sound',
......
......@@ -25,9 +25,9 @@ class Migration(migrations.Migration):
('order', models.PositiveIntegerField()),
('slug', models.SlugField(verbose_name='Slug', blank=True)),
('public', models.BooleanField(default=True, verbose_name='Public')),
('episode', models.ForeignKey(to='emissions.Episode', null=True)),
('episode', models.ForeignKey(to='emissions.Episode', null=True, on_delete=models.SET_NULL)),
('groups', models.ManyToManyField(to='auth.Group', verbose_name='Groups', blank=True)),
('page', models.ForeignKey(to='data.Page')),
('page', models.ForeignKey(to='data.Page', on_delete=models.SET_NULL)),
],
options={
'verbose_name': 'Episode',
......
......@@ -28,9 +28,14 @@ class Migration(migrations.Migration):
('slug', models.SlugField(verbose_name='Slug', blank=True)),
('public', models.BooleanField(default=True, verbose_name='Public')),
('title', models.CharField(max_length=50, verbose_name='Title', blank=True)),
('category', models.ForeignKey(blank=True, to='emissions.Category', null=True)),
(
'category',
models.ForeignKey(
blank=True, to='emissions.Category', null=True, on_delete=models.SET_NULL
),
),
('groups', models.ManyToManyField(to='auth.Group', verbose_name='Groups', blank=True)),
('page', models.ForeignKey(to='data.Page')),
('page', models.ForeignKey(to='data.Page', on_delete=models.SET_NULL)),
(
'tags',
taggit.managers.TaggableManager(
......
......@@ -29,7 +29,7 @@ class Migration(migrations.Migration):
('title', models.CharField(max_length=50, verbose_name='Title', blank=True)),
('future', models.BooleanField(default=True, verbose_name='Future Events Only')),
('groups', models.ManyToManyField(to='auth.Group', verbose_name='Groups', blank=True)),
('page', models.ForeignKey(to='data.Page')),
('page', models.ForeignKey(to='data.Page', on_delete=models.SET_NULL)),
(
'tags',
taggit.managers.TaggableManager(
......
......@@ -22,7 +22,7 @@ class Migration(migrations.Migration):
('image', models.ImageField(max_length=250, null=True, verbose_name='Image', blank=True)),
('got_focus', models.DateTimeField(default=None, null=True, blank=True)),
('has_focus', models.BooleanField(default=False)),
('page', models.ForeignKey(to='data.Page')),
('page', models.ForeignKey(to='data.Page', on_delete=models.CASCADE)),
],
options={},
bases=(models.Model,),
......
......@@ -21,17 +21,33 @@ class Migration(migrations.Migration):
),
(
'episode',
models.ForeignKey(verbose_name='Episode', blank=True, to='emissions.Episode', null=True),
models.ForeignKey(
verbose_name='Episode',
blank=True,
to='emissions.Episode',
null=True,
on_delete=models.SET_NULL,
),
),
(
'newsitem',
models.ForeignKey(
verbose_name='News Item', blank=True, to='emissions.NewsItem', null=True
verbose_name='News Item',
blank=True,
to='emissions.NewsItem',
null=True,
on_delete=models.SET_NULL,
),
),
(
'topik',
models.ForeignKey(verbose_name=b'Topik', blank=True, to='panikombo.Topik', null=True),
models.ForeignKey(
verbose_name=b'Topik',
blank=True,
to='panikombo.Topik',
null=True,
on_delete=models.SET_NULL,
),
),
],
options={},
......
......@@ -16,7 +16,11 @@ class Migration(migrations.Migration):
model_name='newsitemautoselectioncell',
name='category',
field=models.ForeignKey(
verbose_name='Category', blank=True, to='emissions.NewsCategory', null=True
verbose_name='Category',
blank=True,
to='emissions.NewsCategory',
null=True,
on_delete=models.SET_NULL,
),
preserve_default=True,
),
......
......@@ -27,8 +27,8 @@ class Migration(migrations.Migration):
('public', models.BooleanField(default=True, verbose_name='Public')),
('text', ckeditor.fields.RichTextField(null=True, verbose_name='Text', blank=True)),
('groups', models.ManyToManyField(to='auth.Group', verbose_name='Groups', blank=True)),
('page', models.ForeignKey(to='data.Page')),
('topik', models.ForeignKey(to='panikombo.Topik', null=True)),
('page', models.ForeignKey(to='data.Page', on_delete=models.SET_NULL)),
('topik', models.ForeignKey(to='panikombo.Topik', null=True, on_delete=models.SET_NULL)),
],
options={
'verbose_name': 'Topik',
......
# Generated by Django 2.2.19 on 2021-03-26 13:24
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('panikombo', '0021_soundscell_tags'),
]
operations = [
migrations.AlterField(
model_name='episodeautoselectioncell',
name='category',
field=models.ForeignKey(
blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='emissions.Category'
),
),
migrations.AlterField(
model_name='episodeautoselectioncell',
name='page',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data.Page'),
),
migrations.AlterField(
model_name='episodecell',
name='episode',
field=models.ForeignKey(
null=True, on_delete=django.db.models.deletion.CASCADE, to='emissions.Episode'
),
),
migrations.AlterField(
model_name='episodecell',
name='page',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data.Page'),
),
migrations.AlterField(
model_name='itemtopik',
name='page',
field=models.ForeignKey(
blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='data.Page'
),
),
migrations.AlterField(
model_name='newsitemautoselectioncell',
name='page',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data.Page'),
),
migrations.AlterField(
model_name='soundcell',
name='page',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data.Page'),
),
migrations.AlterField(
model_name='soundcell',
name='soundfile',
field=models.ForeignKey(
null=True, on_delete=django.db.models.deletion.CASCADE, to='emissions.SoundFile'
),
),
]
......@@ -20,7 +20,7 @@ from emissions.models import Episode, NewsItem, SoundFile
@register_cell_class
class SoundCell(CellBase):
soundfile = models.ForeignKey('emissions.SoundFile', null=True)
soundfile = models.ForeignKey('emissions.SoundFile', null=True, on_delete=models.CASCADE)
class Meta:
verbose_name = _('Sound')
......@@ -56,7 +56,7 @@ class SoundCell(CellBase):
@register_cell_class
class EpisodeCell(CellBase):
episode = models.ForeignKey('emissions.Episode', null=True)
episode = models.ForeignKey('emissions.Episode', null=True, on_delete=models.CASCADE)
class Meta:
verbose_name = _('Episode')
......@@ -94,7 +94,7 @@ class EpisodeAutoSelectionCell(CellBase):
title = models.CharField(_('Title'), max_length=50, blank=True)
tags = TaggableManager(_('Tags'), blank=True)
and_tags = models.CharField(_('And Tags'), max_length=100, blank=True)
category = models.ForeignKey('emissions.Category', null=True, blank=True)
category = models.ForeignKey('emissions.Category', null=True, blank=True, on_delete=models.CASCADE)
period = models.PositiveSmallIntegerField(
_('Period'), default=0, choices=((0, _('All')), (1, _('Future')), (2, _('Past')))
)
......@@ -186,7 +186,9 @@ class NewsItemAutoSelectionCell(CellBase):
tags = TaggableManager(_('Tags'), blank=True)
and_tags = models.CharField(_('And Tags'), max_length=100, blank=True)
future = models.BooleanField(_('Future Events Only'), default=True)
category = models.ForeignKey('emissions.NewsCategory', verbose_name=_('Category'), null=True, blank=True)
category = models.ForeignKey(
'emissions.NewsCategory', verbose_name=_('Category'), null=True, blank=True, on_delete=models.SET_NULL
)
template_name = 'panikombo/newsitem_auto_selection.html'
......@@ -230,9 +232,13 @@ class NewsItemAutoSelectionCell(CellBase):
class ItemTopik(models.Model):
newsitem = models.ForeignKey('emissions.NewsItem', verbose_name=_('News Item'), null=True, blank=True)
episode = models.ForeignKey('emissions.Episode', verbose_name=_('Episode'), null=True, blank=True)
page = models.ForeignKey('data.Page', null=True, blank=True)
newsitem = models.ForeignKey(
'emissions.NewsItem', verbose_name=_('News Item'), null=True, blank=True, on_delete=models.SET_NULL
)
episode = models.ForeignKey(
'emissions.Episode', verbose_name=_('Episode'), null=True, blank=True, on_delete=models.SET_NULL
)
page = models.ForeignKey('data.Page', null=True, blank=True, on_delete=models.SET_NULL)
@register_cell_class
......@@ -242,7 +248,7 @@ class SoundsCell(CellBase):
include_fragments = models.BooleanField(_('Include fragments'), default=True)
limit_to_focus = models.BooleanField(_('Limit to focused elements'), default=False)
sound_format = models.ForeignKey(
'emissions.Format', verbose_name=_('Limit to format'), null=True, blank=True
'emissions.Format', verbose_name=_('Limit to format'), null=True, blank=True, on_delete=models.CASCADE
)
tags = TaggableManager(_('Tags'), blank=True)
minimal_duration = models.PositiveIntegerField(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment