list_display = ('title', 'external_content', 'content_object', )
form = BriefForm
fieldsets = deepcopy(BriefAdmin.fieldsets)
-
+ exclude = ("short_url", "keywords", "description", "slug", )
admin.site.register(Article, ArticleAdminDisplayable)
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-08-25 16:35
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organization-magazine', '0007_auto_20160825_1614'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='brief',
+ name='external_content_en',
+ ),
+ migrations.RemoveField(
+ model_name='brief',
+ name='external_content_fr',
+ ),
+ ]
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-08-25 16:38
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organization-magazine', '0008_auto_20160825_1835'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='brief',
+ name='content_type',
+ field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='local content'),
+ ),
+ ]
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-08-25 16:43
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organization-magazine', '0009_auto_20160825_1838'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='article',
+ name='department',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='articles', to='organization-network.Department', verbose_name='department'),
+ ),
+ ]
related_articles = models.ManyToManyField("self",
verbose_name=_("Related articles"), blank=True)
- department = models.ForeignKey(Department, related_name='articles', limit_choices_to=dict(id__in=Department.objects.all()), blank=True, null=True, on_delete=models.SET_NULL)
+ 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, null=True)
def get_absolute_url(self):
class Brief(Displayable, RichText): #Orderable
- text_button = models.CharField(blank=True, max_length=150, null=False, verbose_name='text button')
- external_content = models.URLField(blank=True, max_length=1000, null=False, verbose_name='external content')
+ text_button = models.CharField(blank=True, max_length=150, null=False, verbose_name=_('text button'))
+ external_content = models.URLField(blank=True, max_length=1000, null=False, verbose_name=_('external content'))
# used for autocomplete but hidden in admin
content_type = models.ForeignKey(
ContentType,
- verbose_name=_('content page'),
+ verbose_name=_('local content'),
null=True,
blank=True,
editable=False,
@register(Brief)
class BriefTranslationOptions(TranslationOptions):
- fields = ('text_button', 'external_content', )
+ fields = ('text_button', )
@register(Topic)
class TopicTranslationOptions(TranslationOptions):