An app that integrates Foundation grid with FeinCMS contenttypes. Currently only for Foundation, but other frameworks grid syntax is so similar, I'll likely expand this to handle multiple grid systems later.
###Installation
1. Install Foundation 5 and be sure it is working properly before getting into this package.
2. Run `pip install feincms-grid`.
3. Add `'feincms_grid'` to your `INSTALLED_APPS` setting.
4. Add `FEINCMS_GRID_TOTAL_COLUMNS` to your settings if you want to override the total column amount (default is 12).
###Configuration
#####Content types
Just subclass `GridContent` when creating a content type:
from feincms_grid.models import GridContent
class RawTextContent(GridContent):
content = models.TextField()
class Meta:
abstract = True
If you want to change the `render` method of the content type, be sure to call the `super` method to have the content wrapped with the tags:
from feincms_grid.models import GridContent
class MarkdownContent(GridContent):
content = models.TextField()
class Meta:
abstract = True
verbose_name = 'Markdown Text'
def render(self, *args, **kwargs):
t = Template(self.content)
c = Context({})
rendered = t.render(c)
rendered = markdown.markdown(rendered)
self.content = mark_safe(rendered)
return super(MarkdownContent, self).render(*args, **kwargs)
#####Templates
Use the `feincms_grid_render_region` tag to render regions in your templates.
{% extends 'base.html' %}
{% load feincms_page_tags feincms_grid_tags %}
{% block content %}
{% feincms_grid_render_region feincms_page "main" request %}
{% endblock %}
###Usage
Any content types which are subclasses of `GridContent` will have an extra dropdown at the top of them:

Metadata
Release files for feincms-grid 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| feincms-grid-0.1.5.tar.gz | 4.5 kB | Without provenance | Details for feincms-grid-0.1.5.tar.gz |
Release files / feincms-grid-0.1.5.tar.gz
| Download URL | feincms-grid-0.1.5.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
600511dfcd9976d7d8e2961eb345aed32b4ae5b3a39c12bc9a3ad145a7659898
|
|
BLAKE2b-256 checksum How to use checksums |
76a3d3e91530d2928954e5bb9ebe0c3617195f19c2917ee46955b1743fb6ec9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for feincms-grid 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.