Skip to main content

Flask-Diced - CRUD views generator for Flask

Flask-Diced is a set of helper classes for Flask that generates CRUD views and registers them to blueprint/application.

Flask-Diced provides:

  • Detail view

  • Index view

  • Create view

  • Edit view

  • Delete view

Flask-Diced Might Not Be What You Want

Flask-Diced is opinionated, it assumes:

  • the model object has a save method for data persistence and delete method to remove itself.

  • the model can be created with no required arguments.

  • the form used for creation and editing are in the style of Flask-WTF’s, specifically, Flask-Diced expects the form accepts a named parameter obj to pass in the initial value for editing as well as validate_on_submit method and populate_obj method on the form class. In short, just use Flask-WTF.

  • the client should be redirected when done for POST requests.

  • views should have minimal business logic.

Flask-Diced is Extensible

Flask-Diced is designed in a way that customizations can be easily done. All properties and methods can be overridden for customization.

Flask-Diced can be customized to the point that the assumptions described in last section are refer to the default implementation and will no longer hold true if you customize relevant parts of it.

e.g.,

Want to change how the objects list is fetched?

Override query_all

Want to change the name of endpoint of the edit view?

Redefine edit_endpoint

Want to use your own view function or control how views are registered?

Override respective view/register methods.

Installation

Flask-Diced is on PyPI.

pip install Flask-Diced

License

BSD New, see LICENSE for details.

Metadata

Release files for Flask-Diced 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Flask-Diced 0.3
File Size Uploaded
Flask-Diced-0.3.tar.gz 6.9 kB Details

Release files / Flask-Diced-0.3.tar.gz

Download URL Flask-Diced-0.3.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
49c6912b799ac6708aa010560f2ea484bcdbfa96973edb9d70d868abdcaa9a6d
BLAKE2b-256 checksum
How to use checksums
2971def8c9444fb44f8515253f2a91ee1fd7dca0ea7123c589cf799437c9d709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page