Added body field to Homepage. Switched to python-slim image
parent
87b123f1d3
commit
fd505fa144
@ -0,0 +1,2 @@
|
|||||||
|
env/
|
||||||
|
README.md
|
@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 2.1.2 on 2018-11-10 21:18
|
||||||
|
|
||||||
|
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),
|
||||||
|
)
|
||||||
|
]
|
@ -1,7 +1,11 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
from wagtail.core.models import Page
|
from wagtail.core.models import Page
|
||||||
|
from wagtail.core.fields import RichTextField
|
||||||
|
from wagtail.admin.edit_handlers import FieldPanel
|
||||||
|
|
||||||
|
|
||||||
class HomePage(Page):
|
class HomePage(Page):
|
||||||
pass
|
body = RichTextField(blank=True)
|
||||||
|
|
||||||
|
content_panels = Page.content_panels + [FieldPanel("body", classname="full")]
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% load wagtailcore_tags %}
|
||||||
|
|
||||||
{% block body_class %}helvetica{% endblock %}
|
{% block body_class %}helvetica{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Welcome to Datasketch.io!</h1>
|
<h1>Welcome to Datasketch.io!</h1>
|
||||||
|
{{ page.body|richtext }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue