From de1119c06b210de0cbb30802e8a866e7d4154f4b Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@bioforsk.no> Date: Tue, 8 Mar 2016 15:06:13 +0100 Subject: [PATCH] Adding information illustration --- information/admin.py | 9 +++++++-- information/locale/bg/LC_MESSAGES/django.mo | Bin 421 -> 421 bytes information/locale/bg/LC_MESSAGES/django.po | 12 ++++++++---- information/locale/bs/LC_MESSAGES/django.mo | Bin 718 -> 718 bytes information/locale/bs/LC_MESSAGES/django.po | 12 ++++++++---- information/locale/nb/LC_MESSAGES/django.mo | Bin 1008 -> 1054 bytes information/locale/nb/LC_MESSAGES/django.po | 14 +++++++++----- information/models.py | 4 ++++ 8 files changed, 36 insertions(+), 15 deletions(-) diff --git a/information/admin.py b/information/admin.py index a62729bb..17493e56 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 GIT binary patch delta 24 fcmZ3=yp(xD7q6MFfw8WEg@U1}m4Wfb>3oa;RF?)# delta 24 fcmZ3=yp(xD7q6+Vp`os!v4Wwom8sdr>3oa;RBHxJ diff --git a/information/locale/bg/LC_MESSAGES/django.po b/information/locale/bg/LC_MESSAGES/django.po index 32c59888..85660c98 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 GIT binary patch delta 26 hcmX@ddX9Ai3nQ<Yu7R<xfrWyhsg;58W<kcii~wBA25JBR delta 26 hcmX@ddX9Ai3nQ<ouA!l>p|OIYv6ZRWW<kcii~wAp25JBR diff --git a/information/locale/bs/LC_MESSAGES/django.po b/information/locale/bs/LC_MESSAGES/django.po index 310dde5c..2ab26274 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 GIT binary patch delta 335 zcmeysK98gRo)F7a1_lNOZUzPh83qQ15(WkaK?VkfGax|*1_l8}1_myW7$XA%CrAw= z0|N&G1A`hP0|O5O1A{&zM6V4a0|PGu1A_-60|Ore149@i#GF({1_mJp28MD*28Iv@ z28J$128L`#28R2L3=HfH4D}4&%n%ELp>!NG#NbS3h{0u0@g`=l28Lc{h{02#^2?bS z7_t}`7&bFAFfc+L4Wd{WAm%bLKpf5n^&~S$l7WGN6->)Q3<a|pAU<PoEGbD$&d5#8 zE7|x#l#$m=*T7iUz(T>$)XKnkvk(&>BYRkCN=|Be`eb=#aYoO{xy%xiLzw3P0OYkG AMgRZ+ delta 317 zcmbQo@qxYmo)F7a1_lNOE(Qh$83qQ190mpkUIqq+Js?2_28Is|3=EtM3=AI`7#KJh z7#MytFfi~iFfgz%GB9v6Ffa%*Le$GLGBEHlFfeE{GB5}-Ffdp#GB5}+FfjNqGBAWN zFfhb3GB9K_GB9jmgxICP45sTDw3#6q%$OktdO#!?LYNsC*g+bh^660dN@fOzECvRK zR%QkUMyMlM7#J9spblk*I+Trpfq@n3F_1Y>r3?&C`6-nOC8-r93?8Y8n>88P8F@{0 z4Gnb-jTH=ytxU}}+cNPn$~YAr-jPz0nq6GN;9r(nRGeLunO4H!kzbaYk~ukxc?$q1 CS0#u5 diff --git a/information/locale/nb/LC_MESSAGES/django.po b/information/locale/nb/LC_MESSAGES/django.po index 0032aa73..181b1b15 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 cc90ca5f..b99dc628 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) -- GitLab