jSpreadsheet table blocks for Wagtail
Project description
Wagtail Tables
jspreadsheet tables in Wagtail, edited and customised from the Wagtail admin
Getting started
Assuming you have a Wagtail project up and running:
pip install wagtailtables
Add wagtailtables
to your settings.py in the INSTALLED_APPS section, before the core wagtail packages:
INSTALLED_APPS = [
# ...
'wagtailtables',
# ...
]
Add a wagtailtables TableBlock to one of your StreamFields:
from wagtailtables.blocks import TableBlock
class ContentBlocks(StreamBlock):
table_block = TableBlock()
Include your streamblock in one of your pages
class HomePage(Page):
body = StreamField(ContentBlocks())
content_panels = Page.content_panels + [
StreamFieldPanel('body'),
]
Simply render your table block as you would render any other block.
{% load wagtailcore_tags %}
{% block content %}
<div class="container-fluid">
<div class="row">
<div class="col-6">
<h1>{{self.title}}</h1>
<div class="excerpt">{{self.excerpt|richtext}}</div>
</div>
</div>
{% for block in self.body %}
{% include_block block %}
{% endfor %}
</div>
{% endblock %}
Dependencies
- This project relies on Jspreadsheet Community Edition for data entry and manipulation.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
wagtailtables-0.1-py3-none-any.whl
(178.5 kB
view details)
File details
Details for the file wagtailtables-0.1-py3-none-any.whl
.
File metadata
- Download URL: wagtailtables-0.1-py3-none-any.whl
- Upload date:
- Size: 178.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f947702e5e85793df5b9aa78f7ff5d9d9d689f38d2220e557dda1b9e8e097aaf |
|
MD5 | f2da5acb5c551b6195ad8525e7bd938a |
|
BLAKE2b-256 | 351fb0f1bb278d5aa1772b9593744b8a7ed8e1869dcd27c5b933d972b0e9f7ab |