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
Tags
No related merge requests found
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
from django.contrib import admin from django.contrib import admin
from django.forms import Textarea 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 django.db import models
from tinymce.widgets import TinyMCE from tinymce.widgets import TinyMCE
from tinymce import models as tinymce_models from tinymce import models as tinymce_models
...@@ -46,12 +46,17 @@ class InformationLocaleInline(admin.StackedInline): ...@@ -46,12 +46,17 @@ class InformationLocaleInline(admin.StackedInline):
class InformationIllustrationInline(admin.TabularInline): class InformationIllustrationInline(admin.TabularInline):
extra = 1 extra = 1
model = InformationIllustration model = InformationIllustration
class InformationAttachmentInline(admin.TabularInline):
extra = 1
model = InformationAttachment
class InformationAdmin(admin.ModelAdmin): class InformationAdmin(admin.ModelAdmin):
inlines = [ inlines = [
InformationIllustrationInline,
InformationLocaleInline, InformationLocaleInline,
InformationIllustrationInline,
InformationAttachmentInline,
] ]
admin.site.register(Information, InformationAdmin) admin.site.register(Information, InformationAdmin)
\ No newline at end of file
No preview for this file type
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -31,18 +31,22 @@ msgid "Illustration" ...@@ -31,18 +31,22 @@ msgid "Illustration"
msgstr "" msgstr ""
#: models.py:22 #: models.py:22
msgid "Attachment"
msgstr ""
#: models.py:26
msgid "Headline" msgid "Headline"
msgstr "" msgstr ""
#: models.py:23 #: models.py:27
msgid "Lead paragraph" msgid "Lead paragraph"
msgstr "" msgstr ""
#: models.py:24 #: models.py:28
msgid "Body text" msgid "Body text"
msgstr "" msgstr ""
#: models.py:25 #: models.py:29
msgid "Language code" msgid "Language code"
msgstr "" msgstr ""
......
No preview for this file type
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: 2015-02-13 11:13+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
...@@ -36,18 +36,22 @@ msgid "Illustration" ...@@ -36,18 +36,22 @@ msgid "Illustration"
msgstr "Informacija" msgstr "Informacija"
#: models.py:22 #: models.py:22
msgid "Attachment"
msgstr ""
#: models.py:26
msgid "Headline" msgid "Headline"
msgstr "" msgstr ""
#: models.py:23 #: models.py:27
msgid "Lead paragraph" msgid "Lead paragraph"
msgstr "" msgstr ""
#: models.py:24 #: models.py:28
msgid "Body text" msgid "Body text"
msgstr "" msgstr ""
#: models.py:25 #: models.py:29
msgid "Language code" msgid "Language code"
msgstr "" msgstr ""
......
No preview for this file type
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -28,21 +28,25 @@ msgstr "Hovedillustrasjon" ...@@ -28,21 +28,25 @@ msgstr "Hovedillustrasjon"
#: models.py:18 #: models.py:18
msgid "Illustration" msgid "Illustration"
msgstr "Hovedillustrasjon" msgstr "Illustrasjon"
#: models.py:22 #: models.py:22
msgid "Attachment"
msgstr "Vedlegg"
#: models.py:26
msgid "Headline" msgid "Headline"
msgstr "Overskrift" msgstr "Overskrift"
#: models.py:23 #: models.py:27
msgid "Lead paragraph" msgid "Lead paragraph"
msgstr "Ingress" msgstr "Ingress"
#: models.py:24 #: models.py:28
msgid "Body text" msgid "Body text"
msgstr "Brødtekst" msgstr "Brødtekst"
#: models.py:25 #: models.py:29
msgid "Language code" msgid "Language code"
msgstr "Språkkode" msgstr "Språkkode"
......
...@@ -16,6 +16,10 @@ class Information(models.Model): ...@@ -16,6 +16,10 @@ class Information(models.Model):
class InformationIllustration(models.Model): class InformationIllustration(models.Model):
information = models.ForeignKey(Information) information = models.ForeignKey(Information)
illustration = models.ImageField(upload_to='images/information', blank=True, verbose_name=_("Illustration")) 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): class InformationLocale(models.Model):
information = models.ForeignKey(Information) 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