Add thumbnail generation

This commit is contained in:
Skia
2016-11-20 11:56:33 +01:00
parent 71d22e367b
commit 869634d6e1
12 changed files with 104 additions and 12 deletions

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('club', '0004_auto_20160915_1057'),
]
operations = [
migrations.AlterField(
model_name='club',
name='home',
field=models.OneToOneField(related_name='home_of_club', blank=True, on_delete=django.db.models.deletion.SET_NULL, verbose_name='home', null=True, to='core.SithFile'),
),
]

View File

@ -36,7 +36,8 @@ class Club(models.Model):
default=settings.SITH_GROUPS['root']['id'])
edit_groups = models.ManyToManyField(Group, related_name="editable_club", blank=True)
view_groups = models.ManyToManyField(Group, related_name="viewable_club", blank=True)
home = models.OneToOneField(SithFile, related_name='home_of_club', verbose_name=_("home"), null=True, blank=True)
home = models.OneToOneField(SithFile, related_name='home_of_club', verbose_name=_("home"), null=True, blank=True,
on_delete=models.SET_NULL)
def check_loop(self):
"""Raise a validation error when a loop is found within the parent list"""