else:
entry.first_published_at = (
entry.published_at_en or entry.published_at_pl)
- entry.save()
+ orm.Entry.objects.filter(pk=entry.pk).update(
+ first_published_at=entry.first_published_at)
def backwards(self, orm):
# Deleting field 'Entry.in_stream'
mail_text, settings.SERVER_EMAIL, [self.author_email]
)
+ def inline_html(self):
+ for att in self.attachment_set.all():
+ if att.file.name.endswith(".html"):
+ with open(att.file.path) as f:
+ yield f.read()
+
add_translatable(Entry, languages=app_settings.OPTIONAL_LANGUAGES, fields={
'needed': models.CharField(_('needed'), max_length=1, db_index=True, choices=(
</div>
{% if object.image %}
+ <a href="{{ object.image.url }}">
<img class="entry-picture" src="{% thumbnail object.image "200x150" as thumb %}
{{ thumb.url }}
{% empty %}
{{ object.image.url }}
- {% endthumbnail %}" />
+ {% endthumbnail %}" /></a>
{% endif %}
<div class="lead">
{{ object.lead }}
{% entry_begin entry 1 %}
<div class="body">
{{ entry.body }}
+
+{% for inline_html in entry.inline_html %}
+<div class="inline_html">
+ {{ inline_html|safe }}
+</div>
+{% endfor %}
+
</div>
<div style="clear: both;"></div>
setup(
name='django-migdal',
- version='0.2',
+ version='0.3',
author='Radek Czajka',
author_email='radoslaw.czajka@nowoczesnapolska.org.pl',
url = '',