Skip to content
Snippets Groups Projects
Commit de1119c0 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Adding information illustration

parent a20714dc
Branches
No related tags found
No related merge requests found
......@@ -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
No preview for this file type
......@@ -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 ""
......
No preview for this file type
......@@ -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 ""
......
No preview for this file type
......@@ -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"
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment