Skip to main content

11x Wagtail Blog

PyPI Build Supported Python versions Documentation Downloads

11x Wagtail Blog

11x-wagtail-blog is a wagtail app implementing basic blog features for a wagtail site. This project started as an implementation of the blogging features of 11x.engineering, but since it is intended to be used as the first series of articles, it has been open sourced and published here. It is intended to demonstrate how to develop a fully featured package published to PyPI.

Quick Start

To install:

pip install 11x-wagtail-blog

Add x11x_wagtail_blog to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...,
    'x11x_wagtail_blog',
    ...,
]

Since this package only gives you the common features of every blogging application, you will need to define your own page models and derive them from ExtensibleArticlePage:

>>> from x11x_wagtail_blog.models import ExtensibleArticlePage
>>> from wagtail.admin.panels import FieldPanel
>>> from wagtail.blocks import TextBlock
>>> from wagtail.fields import StreamField
>>> class MyArticlePage(ExtensibleArticlePage):
...     body = StreamField([
...         ("text", TextBlock()),
...     ], use_json_field=True)
...
...     content_panels = ExtensibleArticlePage.with_body_panels([
...         FieldPanel("body"),
...     ])

This can be done in any valid Wagtail app.

Next, generate your migrations as usual:

python manage.py makemigrations
python manage.py migrate

You will have to define a template. The default template used is x11x_wagtail_blog/article_page.html, but you should override the get_template() method to return your own template.

<!DOCTYPE html>
<html>
  <head>...</head>
  <body>
    <h1>{{ self.title }}</h1>

    {% include_block self.body %}

    <h2>About the authors</h2>
    {% for author in self.authors %}
    {% include "myblog/about_the_author_section.html" with author=author.value %}
    {% endfor %}

    <h2>Related Articles</h2>
    <ul>
    {% for article in self.related_articles %}
    <li><a href="{% pageurl article %}">{{ article.title }}</a></li>
    {% endfor %}
    </ul>
  </body>
</html>

Release files for 11x-wagtail-blog 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for 11x-wagtail-blog 0.2.0
File Size Uploaded
11x_wagtail_blog-0.2.0.tar.gz 14.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for 11x-wagtail-blog 0.2.0
File Interpreter ABI Platform
11x_wagtail_blog-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.3 kB

Release files / 11x_wagtail_blog-0.2.0.tar.gz

Download URL 11x_wagtail_blog-0.2.0.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
df04f74d20cb37b1e3e27206a8d294821bdefb0af13af4c0fc2875c4f57b5ce9
BLAKE2b-256 checksum
How to use checksums
93613f635a4e866ed1724cb68c92038bc2f82b954c738fca3de1af4975a1df00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / 11x_wagtail_blog-0.2.0-py3-none-any.whl

Download URL 11x_wagtail_blog-0.2.0-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cf6e1a81f6dd333a915bf19729e483dc150aabc0fd292ce6dde4332ce34b3eb
BLAKE2b-256 checksum
How to use checksums
11ca78c839edb023acdef2d0a55cb30889c1a4a9457ede26e88b7f8906793552
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page