Skip to content
Snippets Groups Projects
Commit 79160071 authored by jan.bednarik's avatar jan.bednarik
Browse files

Follow tutorial to change home page

parent a4fe7d6c
Branches
No related tags found
No related merge requests found
# Generated by Django 3.0.5 on 2020-04-16 15:07
import wagtail.core.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("home", "0002_create_homepage"),
]
operations = [
migrations.AddField(
model_name="homepage",
name="body",
field=wagtail.core.fields.RichTextField(blank=True),
),
]
from django.db import models
from wagtail.admin.edit_handlers import FieldPanel
from wagtail.core.fields import RichTextField
from wagtail.core.models import Page
class HomePage(Page):
pass
body = RichTextField(blank=True)
content_panels = Page.content_panels + [
FieldPanel("body", classname="full"),
]
{% extends "base.html" %}
{% load static %}
{% block body_class %}template-homepage{% endblock %}
{% block extra_css %}
{% load wagtailcore_tags %}
{% comment %}
Delete the line below if you're just getting started and want to remove the welcome screen!
{% endcomment %}
<link rel="stylesheet" href="{% static 'css/welcome_page.css' %}">
{% endblock extra_css %}
{% block body_class %}template-homepage{% endblock %}
{% block content %}
{% comment %}
Delete the line below if you're just getting started and want to remove the welcome screen!
{% endcomment %}
{% include 'home/welcome_page.html' %}
{% endblock content %}
{{ page.body|richtext }}
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment