Browse Source

4.11.

master
Stanislav Platil 5 years ago
parent
commit
b526039862
  1. BIN
      db.sqlite3
  2. BIN
      home/__pycache__/models.cpython-38.pyc
  3. 19
      home/migrations/0003_homepage_body.py
  4. BIN
      home/migrations/__pycache__/0003_homepage_body.cpython-38.pyc
  5. 6
      home/models.py
  6. 12
      home/templates/home/home_page.html

BIN
db.sqlite3

Binary file not shown.

BIN
home/__pycache__/models.cpython-38.pyc

Binary file not shown.

19
home/migrations/0003_homepage_body.py

@ -0,0 +1,19 @@
# Generated by Django 3.1.3 on 2020-11-04 10:30
from django.db import migrations
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [
('home', '0002_create_homepage'),
]
operations = [
migrations.AddField(
model_name='homepage',
name='body',
field=wagtail.core.fields.RichTextField(blank=True),
),
]

BIN
home/migrations/__pycache__/0003_homepage_body.cpython-38.pyc

Binary file not shown.

6
home/models.py

@ -5,4 +5,8 @@ from wagtail.core.fields import RichTextField
from wagtail.admin.edit_handlers import FieldPanel
class HomePage(Page):
pass
body = RichTextField(blank=True)
content_panels = Page.content_panels + [
FieldPanel('body', classname="full"),
]

12
home/templates/home/home_page.html

@ -1,21 +1,15 @@
{% extends "base.html" %}
{% load static %}
{% load wagtailcore_tags %}
{% block body_class %}template-homepage{% endblock %}
{% block extra_css %}
{% 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 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' %}
{{ page.body|richtext }}
{% endblock content %}

Loading…
Cancel
Save