add related name to logo fields
This commit is contained in:
parent
9b3b1d547e
commit
07e7efd377
2 changed files with 9 additions and 10 deletions
|
@ -123,11 +123,13 @@ class DCLLinkPluginModel(CMSPlugin):
|
||||||
class DCLNavbarPluginModel(CMSPlugin):
|
class DCLNavbarPluginModel(CMSPlugin):
|
||||||
logo_light = FilerImageField(
|
logo_light = FilerImageField(
|
||||||
on_delete=models.CASCADE, null=True, blank=True,
|
on_delete=models.CASCADE, null=True, blank=True,
|
||||||
help_text='Logo to be used on transparent navbar'
|
help_text='Logo to be used on transparent navbar',
|
||||||
|
related_name="dcl_navbar_logo_light",
|
||||||
)
|
)
|
||||||
logo_dark = FilerImageField(
|
logo_dark = FilerImageField(
|
||||||
on_delete=models.CASCADE, null=True, blank=True,
|
on_delete=models.CASCADE, null=True, blank=True,
|
||||||
help_text='Logo to be used on white navbar'
|
help_text='Logo to be used on white navbar',
|
||||||
|
related_name="dcl_navbar_logo_dark",
|
||||||
)
|
)
|
||||||
logo_url = models.URLField(max_length=300, null=True, blank=True)
|
logo_url = models.URLField(max_length=300, null=True, blank=True)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Generated by Django 1.9.4 on 2018-03-16 09:53
|
# Generated by Django 1.9.4 on 2018-03-17 07:19
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
@ -10,21 +10,18 @@ import filer.fields.image
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('cms', '0014_auto_20160404_1908'),
|
|
||||||
('datacenterlight', '0012_dclcalculatorpluginmodel'),
|
('datacenterlight', '0012_dclcalculatorpluginmodel'),
|
||||||
|
('cms', '0014_auto_20160404_1908'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='DCLNavbarPluginModel',
|
name='DCLNavbarPluginModel',
|
||||||
fields=[
|
fields=[
|
||||||
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE,
|
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
|
||||||
parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
|
|
||||||
('logo_url', models.URLField(blank=True, max_length=300, null=True)),
|
('logo_url', models.URLField(blank=True, max_length=300, null=True)),
|
||||||
('logo_dark', filer.fields.image.FilerImageField(blank=True, help_text='Logo to be used on white navbar',
|
('logo_dark', filer.fields.image.FilerImageField(blank=True, help_text='Logo to be used on white navbar', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dcl_navbar_logo_dark', to='filer.Image')),
|
||||||
null=True, on_delete=django.db.models.deletion.CASCADE, to='filer.Image')),
|
('logo_light', filer.fields.image.FilerImageField(blank=True, help_text='Logo to be used on transparent navbar', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dcl_navbar_logo_light', to='filer.Image')),
|
||||||
('logo_light', filer.fields.image.FilerImageField(blank=True, help_text='Logo to be used on transparent navbar',
|
|
||||||
null=True, on_delete=django.db.models.deletion.CASCADE, to='filer.Image')),
|
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'abstract': False,
|
'abstract': False,
|
||||||
|
|
Loading…
Reference in a new issue