Flask-Classical
Flask extension for providing class-based views.
The following views are provided: CreateView, EditView, DeleteView
Installation
$ pip install Flask-Classical
Usage
First create and initialize the cbv object:
from flask_cbv import Cbv
cbv = Cbv(db, wtf)
# db is your Flask-Alchemist instance
# wtf is your Flask-Formist instance
And then you can add routes, for example:
entries_blueprint.add_url_rule(
"/<int:obj_id>/edit/",
view_func=login_required(
cbv.EditView.as_view(
"edit_entry",
form_cls=EntryForm,
template="entries/edit_entry.html",
obj_cls=Entry,
blueprint="entries",
validators=(current_user_is_author,),
)
),
methods=("GET", "POST"),
)
License
Flask-Classical was created by Rafal Padkowski. It is licensed under the terms
of the MIT license.
Metadata
Release files for Flask-Classical 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flask_classical-0.1.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flask_classical-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / flask_classical-0.1.0.tar.gz
| Download URL | flask_classical-0.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
055d16f216221ccc57818ffa932650afc9efdd58e727997b185f62ab45c90389
|
|
BLAKE2b-256 checksum How to use checksums |
bd36cedfb5ee6027a2ef35311da5a7d69343744fa232b5ff6d63984494f90240
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/5.15.0-79-generic
|
Release files / flask_classical-0.1.0-py3-none-any.whl
| Download URL | flask_classical-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7499427d1423781b2865065580691173fd18581a0b2fc15f425425d77e2093d
|
|
BLAKE2b-256 checksum How to use checksums |
2bcd86d7b97e9d2be12b0f1cb4a3c564423eb1c0193989026b5e3ea1b1bfb322
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/5.15.0-79-generic
|