django-siteforms
https://github.com/idlesign/django-siteforms
Django reusable app that renders complete forms and reduces the amount of form-related template code. It supports declarative layouts and attributes, Bootstrap 4 and 5, nested subforms, read-only views, and queryset filtering forms.
Installation
$ python -m pip install django-siteforms
Python 3.10 or newer and Django 3.2 or newer are required. See the tested compatibility matrix for the combinations covered by CI.
Quick example
from siteforms.composers.bootstrap5 import Bootstrap5
from siteforms.toolbox import ModelForm
from .models import Article
class ArticleForm(ModelForm):
class Composer(Bootstrap5):
opt_submit = 'Save'
class Meta:
model = Article
fields = ['title', 'contents']
Pass the request and data source when constructing the form:
form = ArticleForm(request=request, src='POST')
if form.is_submitted and form.is_valid():
article = form.save()
Then render it directly:
{{ form }}
The output includes the <form> wrapper, CSRF token, fields, and submit button. Start with the
Quickstart and continue with
the full documentation.
Development
Development tasks are provided by makeapp. After cloning the repository, install or update it and initialize the project:
$ uv tool install makeapp
# or: uv tool upgrade makeapp
$ ma tools
$ ma up
Run the same project checks before submitting a pull request:
$ ma style
$ ma tests
$ ma docs --build
Metadata
Release files for django-siteforms 1.3.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 | |
|---|---|---|---|
| django_siteforms-1.3.0.tar.gz | 29.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_siteforms-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.5 kB
Release files / django_siteforms-1.3.0.tar.gz
| Download URL | django_siteforms-1.3.0.tar.gz |
|---|---|
| Size | 29.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d684e94576941b5f7249dd6881f594e7f677852f72d3d7bcae12f4725853e79
|
|
BLAKE2b-256 checksum How to use checksums |
6e7ca0ad48193bc6addfeb721b58e684f15aea4b8fd0db3523b8f020e93ac13e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / django_siteforms-1.3.0-py3-none-any.whl
| Download URL | django_siteforms-1.3.0-py3-none-any.whl |
|---|---|
| Size | 42.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63616d5cfddfa19c94871c488340a5b500db88428783a47951b5123d831d80b9
|
|
BLAKE2b-256 checksum How to use checksums |
9cf00c1e6a4cbc2142ab5132e630ab979c5bf1bd6917c44e7d4ce06cd478ea53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|