Version to run on serve #1
@@ -15,7 +15,7 @@ from snowpenguin.django.recaptcha2.widgets import ReCaptchaWidget
|
||||
from project.forms import NewsletterSubscriptionForm
|
||||
from project.models import Section, Quote, SliderItem, SectionText, Video, DownloadSection, DownloadSectionFolder, \
|
||||
TextSliderItem, HighlightListItem, ReferenceListItem, SocialMediaList, SocialMediaListItem, Timetable, \
|
||||
TimetableItem, Partner, HighlightList, Image, TitleListItem, TitleList, IntroImage, Gallery
|
||||
TimetableItem, Partner, HighlightList, Image, TitleListItem, TitleList, IntroImage, Gallery, Iframe
|
||||
|
||||
|
||||
@plugin_pool.register_plugin
|
||||
@@ -29,7 +29,7 @@ class SectionPlugin(CMSPluginBase):
|
||||
'SectionTextPlugin', 'VideoPlugin', 'DownloadSectionPlugin', 'TextSliderPlugin',
|
||||
'HighlightListPlugin', 'ReferenceListPlugin', 'FormPlugin', 'PicturePlugin', 'SubPageListPlugin',
|
||||
'PartnerPlugin', 'NewsletterSubscriptionPlugin', 'NewsletterArchivePlugin',
|
||||
'SocialMediaListPlugin', 'GalleryPlugin', 'FlipbookPlugin']
|
||||
'SocialMediaListPlugin', 'GalleryPlugin', 'IframePlugin']
|
||||
|
||||
|
||||
@plugin_pool.register_plugin
|
||||
@@ -351,7 +351,8 @@ class GalleryPlugin(CMSPluginBase):
|
||||
|
||||
|
||||
@plugin_pool.register_plugin
|
||||
class FlipbookPlugin(CMSPluginBase):
|
||||
class IframePlugin(CMSPluginBase):
|
||||
model = Iframe
|
||||
module = 'Content'
|
||||
name = 'Flipbook'
|
||||
render_template = 'project/plugins/content/flipbook.html'
|
||||
name = 'Iframe'
|
||||
render_template = 'project/plugins/content/iframe.html'
|
||||
|
||||
30
src/project/migrations/0012_iframe.py
Normal file
30
src/project/migrations/0012_iframe.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.21 on 2024-05-23 15:51
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0020_old_tree_cleanup'),
|
||||
('project', '0011_auto_20211104_1608'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Iframe',
|
||||
fields=[
|
||||
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='project_iframe', serialize=False, to='cms.CMSPlugin')),
|
||||
('html', models.TextField(verbose_name='HTML')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Iframe',
|
||||
'verbose_name_plural': 'Iframes',
|
||||
'abstract': False,
|
||||
},
|
||||
bases=('cms.cmsplugin',),
|
||||
),
|
||||
]
|
||||
@@ -349,3 +349,14 @@ class Gallery(CMSPlugin):
|
||||
@property
|
||||
def files(self):
|
||||
return self.folder.files.all().order_by('name')
|
||||
|
||||
|
||||
class Iframe(CMSPlugin):
|
||||
html = models.TextField('HTML')
|
||||
|
||||
class Meta(CMSPlugin.Meta):
|
||||
verbose_name = 'Iframe'
|
||||
verbose_name_plural = 'Iframes'
|
||||
|
||||
def __str__(self):
|
||||
return self.html
|
||||
|
||||
Reference in New Issue
Block a user