fieldsets = deepcopy(ArticleAdmin.fieldsets)
exclude = ('related_posts',)
- filter_horizontal = ['categories', 'related_articles', ]
+ filter_horizontal = ['categories',]
inlines = [ArticleImageInline,
ArticlePersonAutocompleteInlineAdmin,
DynamicContentArticleInline]
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-09-24 09:20
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organization-magazine', '0007_auto_20160924_1058'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='article',
+ name='related_articles',
+ ),
+ ]
class Article(BlogPost, SubTitled):
- related_articles = models.ManyToManyField("self", verbose_name=_("Related articles"), blank=True)
department = models.ForeignKey(Department, verbose_name=_('department'), related_name='articles', limit_choices_to=dict(id__in=Department.objects.all()), blank=True, null=True, on_delete=models.SET_NULL)
topics = models.ManyToManyField("Topic", verbose_name=_('topics'), related_name="articles", blank=True)
{% load i18n mezzanine_tags %}
<div class="brief-box">
-
+
<div class="brief-box__head">
{% trans 'Brief !' %}
</div>
{% endblock %}
{% block page_related_content %}
-
- {% if page.departmentpage.articles_related.all %}
-
+ {% if page.departmentpage.department.articles.all %}
<div class="white-bg pb2">
<div class="container">
<div class="row tac">
</div>
</div>
<div class="row tac">
- {% for article in page.departmentpage.articles_related.all %}
+ {% for article in page.departmentpage.department.articles.all %}
<div class="col-lg-3 col-md-4 col-sm-4 col-xs-6">
{% include 'magazine/article/includes/article_card.html' %}
</div>