from mezzanine.core.models import RichText, Displayable, Slugged
from mezzanine.core.fields import RichTextField, OrderField, FileField
from mezzanine.utils.models import AdminThumbMixin, upload_to
-from mezzanine.galleries.models import BaseGallery
from organization.core.models import *
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-08-24 13:50
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organization-pages', '0002_auto_20160824_1454'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='pageblock',
+ name='page',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blocks', to='pages.Page', verbose_name='page'),
+ ),
+ migrations.AlterField(
+ model_name='pageimage',
+ name='page',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='images', to='pages.Page', verbose_name='page'),
+ ),
+ ]
class PageBlock(Block):
- page = models.ForeignKey(Page, verbose_name=_('page'), related_name='page_blocks', blank=True, null=True, on_delete=models.SET_NULL)
+ page = models.ForeignKey(Page, verbose_name=_('page'), related_name='blocks', blank=True, null=True, on_delete=models.SET_NULL)
class Meta:
verbose_name = _("block")
class PageImage(Image):
- page = models.ForeignKey(Page, verbose_name=_('page'), related_name='page_images', blank=True, null=True, on_delete=models.SET_NULL)
+ page = models.ForeignKey(Page, verbose_name=_('page'), related_name='images', blank=True, null=True, on_delete=models.SET_NULL)
class Meta:
verbose_name = _("image")
"mezzanine.pages",
"mezzanine.blog",
"mezzanine.forms",
- "mezzanine.galleries",
+ # "mezzanine.galleries",
"mezzanine.twitter",
"mezzanine.accounts",
# "mezzanine.mobile",
{% endblock %}
{% block page_sub_content %}
- {% if page.custompage.page_blocks.all %}
+ {% if page.custompage.blocks.all %}
<div class="white-bg">
<div class="container">
<div class="row">
<div class="col-sm-12">
<hr class="mt0" />
- {% for pageblock in page.custompage.page_blocks.all %}
+ {% for pageblock in page.custompage.blocks.all %}
<div class="row" data-summary-content>
<div class="col-sm-9 col-sm-push-3 col-lg-8 col-lg-push-2 white-bg">
{% if not forloop.first and pageblock.with_separator %}
{% load mezzanine_tags organization_tags %}
<a href="{{ object.get_absolute_url }}" title="{{ object.title }}" class="page-box">
<div class="page-box__image">
- {% with object.page_images.all|get_type:'card' as image %}
+ {% with object.images.all|get_type:'card' as image %}
<img src="{{ MEDIA_URL }}{% thumbnail image.file 900 400 %}" />
{% endwith %}
</div>