Catalog PyPI
Back to packageRELEASE DETAILS

0.2.0

PyPI

11x-wagtail-blog

11x Wagtail Blog

blogwagtail
Published13 Jul 2023
Direct dependencies7
Transitive dependenciesNot calculated

README

Version 0.2.0 documentation
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.

.. code-block:: html

    <!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>


.. |PyPI| image:: https://img.shields.io/pypi/v/11x-wagtail-blog
   :target: https://pypi.org/project/11x-wagtail-blog/
.. |Build| image:: https://github.com/11x-engineering/11x-wagtail-blog/actions/workflows/package.yml/badge.svg
   :target: https://github.com/11x-engineering/11x-wagtail-blog/actions/workflows/package.yml
.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/11x-wagtail-blog.svg
   :target: https://pypi.org/project/11x-wagtail-blog/
.. |Documentation| image:: https://readthedocs.org/projects/11x-wagtail-blog/badge/?version=latest
   :target: https://11x-wagtail-blog.readthedocs.io/en/latest/?badge=latest
.. |Downloads| image:: https://pepy.tech/badge/11x-wagtail-blog/month
   :target: https://pepy.tech/project/11x-wagtail-blog/

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 7

Native requirements
7 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
wagtail
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.7",
  "evaluation": "NOT_EVALUATED"
}
wagtail >=4.0,<6runtime
sphinx
Environment
{
  "extras": "",
  "marker": "extra == \"doc\"",
  "requires_python": ">=3.7",
  "evaluation": "NOT_EVALUATED"
}
sphinx ; extra == "doc"runtime
sphinx-rtd-theme
Environment
{
  "extras": "",
  "marker": "extra == \"doc\"",
  "requires_python": ">=3.7",
  "evaluation": "NOT_EVALUATED"
}
sphinx-rtd-theme ; extra == "doc"runtime
tox-gh-actions
Environment
{
  "extras": "",
  "marker": "extra == \"github\"",
  "requires_python": ">=3.7",
  "evaluation": "NOT_EVALUATED"
}
tox-gh-actions >=3.0 ; extra == "github"runtime
black
Environment
{
  "extras": "",
  "marker": "extra == \"test\"",
  "requires_python": ">=3.7",
  "evaluation": "NOT_EVALUATED"
}
black ; extra == "test"runtime
tox
Environment
{
  "extras": "",
  "marker": "extra == \"test\"",
  "requires_python": ">=3.7",
  "evaluation": "NOT_EVALUATED"
}
tox >=4.6.3 ; extra == "test"runtime
faker
Environment
{
  "extras": "",
  "marker": "extra == \"test\"",
  "requires_python": ">=3.7",
  "evaluation": "NOT_EVALUATED"
}
faker >=18.11.2 ; extra == "test"runtime

Distribution files

2 collected
11x_wagtail_blog-0.2.0-py3-none-any.whl

bdist_wheel · 15.57 KB · Python py3

Source file
11x_wagtail_blog-0.2.0.tar.gz

sdist · 14.06 KB · Python source

Source file

Repository

PENDING
11x-engineering/11x-wagtail-blog

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 15:11 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:b230224fe5baca54fa84c4fc48c95c348b5b8e8a7e2a3d6920f59ab37f674a77

Other collected versions

View all collected versions →