Basic home page

This commit is contained in:
Oleg Lavrovsky 2016-12-09 07:08:34 +01:00
parent cccdf0aa31
commit 01d42491f6
3 changed files with 36 additions and 4 deletions

View file

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-09 05:55
from __future__ import unicode_literals
from django.db import migrations, models
import wagtail.wagtailcore.blocks
import wagtail.wagtailcore.fields
import wagtail.wagtailimages.blocks
class Migration(migrations.Migration):
dependencies = [
('home', '0002_create_homepage'),
]
operations = [
migrations.AddField(
model_name='homepage',
name='body_de',
field=wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock())), blank=True, null=True),
),
migrations.AddField(
model_name='homepage',
name='body_fr',
field=wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock())), blank=True, null=True),
),
migrations.AddField(
model_name='homepage',
name='title_fr',
field=models.CharField(default='', max_length=255),
),
]

View file

@ -39,7 +39,7 @@ class HomePage(Page):
index.SearchField('body_fr'),
]
content_panels = Page.content_panels + [
StreamFieldPanel('title_fr'),
FieldPanel('title_fr'),
StreamFieldPanel('body_de'),
StreamFieldPanel('body_fr'),
]

View file

@ -1,11 +1,10 @@
{% extends "base.html" %}
{% load wagtailcore_tags %}
{% block body_class %}template-{{ self.get_verbose_name|slugify }}{% endblock %}
{% block content %}
<h1>Welcome to your new Wagtail site!</h1>
<p>You can access the admin interface <a href="{% url 'wagtailadmin_home' %}">here</a> (make sure you have run "dj createsuperuser" in the console first).
{% include_block self.body %}
<p>If you haven't already given the documentation a read, head over to <a href="http://wagtail.readthedocs.org/">http://wagtail.readthedocs.org</a> to start building on Wagtail</p>
{% endblock %}