diff --git a/combo/apps/gallery/migrations/0003_gallerycell_title.py b/combo/apps/gallery/migrations/0003_gallerycell_title.py new file mode 100644 index 00000000..57cb09c3 --- /dev/null +++ b/combo/apps/gallery/migrations/0003_gallerycell_title.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('gallery', '0002_image_title'), + ] + + operations = [ + migrations.AddField( + model_name='gallerycell', + name='title', + field=models.CharField(max_length=50, null=True, verbose_name='Title', blank=True), + preserve_default=True, + ), + ] diff --git a/combo/apps/gallery/models.py b/combo/apps/gallery/models.py index 5f4e2671..ac41a231 100644 --- a/combo/apps/gallery/models.py +++ b/combo/apps/gallery/models.py @@ -24,6 +24,7 @@ from combo.data.library import register_cell_class @register_cell_class class GalleryCell(CellBase): + title = models.CharField(_('Title'), max_length=50, blank=True, null=True) manager_form_template = 'combo/gallery_manager.html' class Meta: diff --git a/combo/apps/gallery/templates/combo/gallery_manager.html b/combo/apps/gallery/templates/combo/gallery_manager.html index 9131c218..438a7e3d 100644 --- a/combo/apps/gallery/templates/combo/gallery_manager.html +++ b/combo/apps/gallery/templates/combo/gallery_manager.html @@ -2,6 +2,10 @@ {% load static thumbnail i18n %} {% block cell-form %} +
+{% csrf_token %} + {{ form.as_p }} +