iommi is a high level framework built on django
Project description
iommi is a Django-based framework that magically create pages, forms and tables with advanced out-of-the-box functionality based on your applications models - without sacrificing flexibility and control.
Major features:
A system to project django model definitions into more high level definitions
Forms: view models, data validation, and parsing
Queries: filtering lists/query sets
Tables: view models for lists/query sets, html tables, and CSV reports
Pages: compose pages from parts like forms, tables and html fragments
All the components are written with the same philosophy of:
Everything has a name
Traversing a namespace is done with __ when . can’t be used in normal python syntax
Callables for advanced usage, values for the simple cases
Late binding
Declarative/programmatic hybrid API
Prepackaged commonly used patterns (that can still be customized!)
Single point customization with no boilerplate
Escape hatches included
See philosophy for explanations of all these.
Example:
class IndexPage(Page):
title = html.h1('Supernaut')
welcome_text = 'This is a discography of the best acts in music!'
artists = Table(auto__model=Artist, page_size=5)
albums = Table(
auto__model=Album,
page_size=5,
)
tracks = Table(auto__model=Album, page_size=5)
urlpatterns = [
path('', IndexPage().as_view()),
]
This creates a page with three separate tables, a header and some text:
For more examples, see the examples project.
Usage
See usage.
Running tests
You need to have tox installed then:
make venv
source env/bin/activate
make test
make test-docs
License
BSD
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for iommi-2.8.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 048935aba41db8b704b3fa27829bccc17e947c8ee69f18b8360170991505a842 |
|
MD5 | 5bbe4cc055c56aa51d38911ea8420d1d |
|
BLAKE2b-256 | 663ca2263536da2d892ea98cd378fb294e1363cc9762bee4701cec57f50a7dca |