diff --git a/information/admin.py b/information/admin.py index a62729bb179a295b329746292c60a5bb34516566..17493e564fe79e2520962fa12811ad57b9f1600c 100644 --- a/information/admin.py +++ b/information/admin.py @@ -19,7 +19,7 @@ from django.contrib import admin from django.forms import Textarea -from information.models import Information, InformationLocale, InformationIllustration +from information.models import Information, InformationLocale, InformationIllustration, InformationAttachment from django.db import models from tinymce.widgets import TinyMCE from tinymce import models as tinymce_models @@ -46,12 +46,17 @@ class InformationLocaleInline(admin.StackedInline): class InformationIllustrationInline(admin.TabularInline): extra = 1 model = InformationIllustration + +class InformationAttachmentInline(admin.TabularInline): + extra = 1 + model = InformationAttachment class InformationAdmin(admin.ModelAdmin): inlines = [ - InformationIllustrationInline, InformationLocaleInline, + InformationIllustrationInline, + InformationAttachmentInline, ] admin.site.register(Information, InformationAdmin) \ No newline at end of file diff --git a/information/locale/bg/LC_MESSAGES/django.mo b/information/locale/bg/LC_MESSAGES/django.mo index dc2d95ede55993a7d6f97a0c78606ad1f5a55ae0..22916f5611b42f5a2586ceed818afbcd7abec322 100644 Binary files a/information/locale/bg/LC_MESSAGES/django.mo and b/information/locale/bg/LC_MESSAGES/django.mo differ diff --git a/information/locale/bg/LC_MESSAGES/django.po b/information/locale/bg/LC_MESSAGES/django.po index 32c59888e3a8166ef3204bd983246ad5e669cfc9..85660c9816d30871767026114797d54f14f29088 100644 --- a/information/locale/bg/LC_MESSAGES/django.po +++ b/information/locale/bg/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-13 13:56+0100\n" +"POT-Creation-Date: 2016-03-08 15:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -31,18 +31,22 @@ msgid "Illustration" msgstr "" #: models.py:22 +msgid "Attachment" +msgstr "" + +#: models.py:26 msgid "Headline" msgstr "" -#: models.py:23 +#: models.py:27 msgid "Lead paragraph" msgstr "" -#: models.py:24 +#: models.py:28 msgid "Body text" msgstr "" -#: models.py:25 +#: models.py:29 msgid "Language code" msgstr "" diff --git a/information/locale/bs/LC_MESSAGES/django.mo b/information/locale/bs/LC_MESSAGES/django.mo index 729deb0c674387fd793cd2bd400d50caa209177b..c4885b3709424da54cdb42dd8260b9cc4e679f59 100644 Binary files a/information/locale/bs/LC_MESSAGES/django.mo and b/information/locale/bs/LC_MESSAGES/django.mo differ diff --git a/information/locale/bs/LC_MESSAGES/django.po b/information/locale/bs/LC_MESSAGES/django.po index 310dde5cb2c2428a2e8010e971ee7fc248ad31d1..2ab26274f73b195feb60c67c62aca6c706474d6c 100644 --- a/information/locale/bs/LC_MESSAGES/django.po +++ b/information/locale/bs/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-13 13:56+0100\n" +"POT-Creation-Date: 2016-03-08 15:03+0100\n" "PO-Revision-Date: 2015-02-13 11:13+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -36,18 +36,22 @@ msgid "Illustration" msgstr "Informacija" #: models.py:22 +msgid "Attachment" +msgstr "" + +#: models.py:26 msgid "Headline" msgstr "" -#: models.py:23 +#: models.py:27 msgid "Lead paragraph" msgstr "" -#: models.py:24 +#: models.py:28 msgid "Body text" msgstr "" -#: models.py:25 +#: models.py:29 msgid "Language code" msgstr "" diff --git a/information/locale/nb/LC_MESSAGES/django.mo b/information/locale/nb/LC_MESSAGES/django.mo index 1ac720ec66e8d2bc1809b1051b2012f012edf897..a78a515097d42637c784810b60f459ac626f4909 100644 Binary files a/information/locale/nb/LC_MESSAGES/django.mo and b/information/locale/nb/LC_MESSAGES/django.mo differ diff --git a/information/locale/nb/LC_MESSAGES/django.po b/information/locale/nb/LC_MESSAGES/django.po index 0032aa738b078b19579cb78d4ad99b69cddf3514..181b1b15e89c6ade4504eb171cd17adf8e4ef039 100644 --- a/information/locale/nb/LC_MESSAGES/django.po +++ b/information/locale/nb/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-13 13:56+0100\n" +"POT-Creation-Date: 2016-03-08 15:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -28,21 +28,25 @@ msgstr "Hovedillustrasjon" #: models.py:18 msgid "Illustration" -msgstr "Hovedillustrasjon" +msgstr "Illustrasjon" #: models.py:22 +msgid "Attachment" +msgstr "Vedlegg" + +#: models.py:26 msgid "Headline" msgstr "Overskrift" -#: models.py:23 +#: models.py:27 msgid "Lead paragraph" msgstr "Ingress" -#: models.py:24 +#: models.py:28 msgid "Body text" msgstr "Brødtekst" -#: models.py:25 +#: models.py:29 msgid "Language code" msgstr "Språkkode" diff --git a/information/models.py b/information/models.py index cc90ca5f4342b6fc2c43378b9b568fcc50a66ded..b99dc6281873854aa3f9ffba1ea87cdea68c0841 100644 --- a/information/models.py +++ b/information/models.py @@ -16,6 +16,10 @@ class Information(models.Model): class InformationIllustration(models.Model): information = models.ForeignKey(Information) illustration = models.ImageField(upload_to='images/information', blank=True, verbose_name=_("Illustration")) + +class InformationAttachment(models.Model): + information = models.ForeignKey(Information) + attachment = models.FileField(upload_to='attachments/information', blank=True, verbose_name=_("Attachment")) class InformationLocale(models.Model): information = models.ForeignKey(Information)