Skip to main content

HTML content blocks for Django.

Project description

PyPI Package Version MIT License PyPI Status

Python Versions Supported Django Versions Supported

Test Coverage Read the Docs

Code Style Black PyPI Downloads GitHub Repo Stars

Django Content Blocks

Django Content Blocks is a reusable Django app that allows users to create and manage custom content blocks for their website. Via the django admin site it provides an easy-to-use interface for creating content blocks that can be related to any other object. This allows you to provide rich, dynamic, editable content for your existing models such as pages, products, projects or whatever your project has.

The templates used to render content blocks are made in the same way as any other template in your project, giving you access to the full power of your chosen template engine.

Content blocks can contain any type of content, including text, images, videos, and more, and can be arranged in any order. Additionally, Django Content Blocks includes support for drafts and previews, allowing users to see how their changes will look before publishing them.

The content block editor in the Django admin site.

The content block editor in the Django admin site.

Installation instructions and detailed documentation can be found on ReadTheDocs.

Development Status & Roadmap

Django content blocks is already in use in a number of production websites however it is still considered to be in beta as active development continues.

Major development plans/ideas include:

  • Content block editor HTML, CSS and JS rework.
    • This all needs updating to use modern HTML and CSS (flex, grid etc) and vanilla JS.

    • Currently using jQuery which isn’t the end of the world as it comes with django.contrib.admin so not an extra dependency.

  • Option for vertical layout for nested forms in the content block editor
    • Sometimes nested blocks can represent columns within a content block. It would be nice to give the option to have these shown side by side in the content block editor.

  • django-content-blocks 2.0
    • This will be a major rewrite which will move the representation of content blocks out of the database and into a JSONField. This will greatly improve performance as the whole representation of an object’s content blocks can be returned at once and any subsequent queries required can be made in a prefetch fashion.

    • The ContentBlockField will become pluggable allowing developers to add/remove available fields from within their project.

  • Django content blocks suite of apps providing additional functionality and basic apps powered by content blocks:
    • CMS

    • Blog

    • Contact forms

Dependencies (and Thank You)

Thank You

Contributing

Contributions, advice and guidance are welcome. Please make contact before writing any code!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-content-blocks-1.4.0.tar.gz (490.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_content_blocks-1.4.0-py3-none-any.whl (507.7 kB view details)

Uploaded Python 3

File details

Details for the file django-content-blocks-1.4.0.tar.gz.

File metadata

  • Download URL: django-content-blocks-1.4.0.tar.gz
  • Upload date:
  • Size: 490.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for django-content-blocks-1.4.0.tar.gz
Algorithm Hash digest
SHA256 764e12400a08b95c3293b3ccff1eb76f1e9c0b2806205bfcc52cdc6a264c53eb
MD5 884453cc84e429a9a673ab7b476437c6
BLAKE2b-256 b39f1c66c4cdce904350e9e8284fb4a0a572854caafc246ae73ed473f745b382

See more details on using hashes here.

File details

Details for the file django_content_blocks-1.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_content_blocks-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea6d3e69ea54ccef923bd2a96e1216ca700554dcbc54495e7faf4bfcaf7ab4da
MD5 fe7f2a8e2505038e47ff610ddd1e1d2a
BLAKE2b-256 54e2be333bc075041212758c6064bb3b3c9ccad949d805e17e5fb6f25a53cfd4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page