Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' of https://github.com/ic-labs/django-icekit in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
Greg Turner committed Nov 1, 2016
2 parents 7f3e537 + e3e3533 commit 5503983
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('icekit_plugins_oembed_with_caption', '0004_auto_20160919_2008'),
]

operations = [
migrations.AlterModelTable(
name='oembedwithcaptionitem',
table='contentitem_icekit_plugins_oembed_with_caption_oembedwithcaptionitem',
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('icekit_plugins_oembed_with_caption', '0005_auto_20161027_1711'),
]

operations = [
migrations.AlterModelOptions(
name='oembedwithcaptionitem',
options={},
),
migrations.AlterModelTable(
name='oembedwithcaptionitem',
table='contentitem_oembed_with_caption_item',
),
]
3 changes: 2 additions & 1 deletion icekit/plugins/oembed_with_caption/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@


class OEmbedWithCaptionItem(abstract_models.AbstractOEmbedWithCaptionItem):
pass
class Meta:
db_table = "contentitem_oembed_with_caption_item"
3 changes: 2 additions & 1 deletion icekit/plugins/quote/abstract_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class AbstractQuoteItem(ContentItem):
"""
quote = models.TextField()
attribution = models.CharField(max_length=255, blank=True)
organisation = models.CharField(max_length=255, blank=True, help_text="only shown if attribution is given")
organisation = models.CharField(max_length=255, blank=True)
url = models.URLField(blank=True, help_text="link to the source")

class Meta:
abstract = True
Expand Down
24 changes: 24 additions & 0 deletions icekit/plugins/quote/migrations/0004_auto_20161027_1717.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('icekit_plugins_quote', '0003_auto_20160912_2218'),
]

operations = [
migrations.AddField(
model_name='quoteitem',
name='url',
field=models.URLField(help_text=b'link to the source', blank=True),
),
migrations.AlterField(
model_name='quoteitem',
name='organisation',
field=models.CharField(max_length=255, blank=True),
),
]
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<blockquote>
<p>{{ instance.quote|safe }}</p>
{% if instance.attribution %}
<footer>{{ instance.attribution}}{% if instance.organisation %}, <cite>{{ instance.organisation }}</cite>{% endif %}</footer>
{% if instance.attribution or instance.organisation %}
<footer>
{% if instance.url %}<a href="{{ instance.url }}" target="_blank">{% endif %}
{{ instance.attribution}}{% if instance.attribution and instance.organisation %}, {% endif %}{% if instance.organisation %}<cite>{{ instance.organisation }}</cite>{% endif %}
{% if instance.url %}</a>{% endif %}
</footer>
{% endif %}
</blockquote>

0 comments on commit 5503983

Please sign in to comment.