Installing Wagtail

Wagtail has become a very popular CMS in the last year. Start with this video to see how to get it up and running for your project, and get content on the homepage.
Download HD Version next video: reverse, lazy and resolve - Django url-resolvers



pip install wagtail

wagtail start demo

vim demo/settings/

./ migrate

./ createsuperuser


from __future__ import unicode_literals

from django.db import models

from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel

class HomePage(Page):
    summary = models.CharField(max_length=140, default='')
    body = RichTextField(blank=True)

    content_panels = Page.content_panels + [
        FieldPanel('summary', classname='full'),
        FieldPanel('body', classname="full"),
./ makemigrations
./ migrate


{% extends "base.html" %}

{% load wagtailcore_tags %}

{% block body_class %}template-homepage{% endblock %}

{% block content %}
        {{ page.body|richtext }}
        <h3>Tweet This</h3>
        {{ page.summary }}
{% endblock %}
comments powered by Disqus