Django code generator with styled HTML templates
Project description
Zfold
Django code generator with styled HTML templates.
Generate complete CRUD stacks from the terminal—models, views, forms, URLs, admin registration, and production-ready styled templates—in one command.
Install
pip install zfold
Quick Start
From your Django project root (where manage.py lives):
zfold scaffold blog Post title:CharField content:TextField published:BooleanField
This creates a complete blog app with:
| File | Contents |
|---|---|
models.py |
Post model with your fields |
forms.py |
PostForm (ModelForm) |
views.py |
List, detail, create, update, delete views |
urls.py |
URL patterns for all views |
admin.py |
Admin registration with list_display |
templates/ |
Styled HTML templates |
Then wire it up:
# settings.py
INSTALLED_APPS = [..., 'blog']
# urls.py
path('blog/', include('blog.urls'))
Run migrations and open /blog/:
python manage.py makemigrations blog && python manage.py migrate
python manage.py runserver
Commands
scaffold
Generate a complete app:
zfold scaffold <app> <Model> [field:Type ...]
zfold s blog Post title:CharField body:TextField # alias
generate
Generate individual components for an existing app:
zfold generate <component> <app> <Model> [field:Type ...]
zfold g model blog Comment body:TextField # alias
| Component | Output |
|---|---|
model |
Model class + admin registration |
view |
CRUD class-based views |
form |
ModelForm |
template |
Styled HTML templates |
Fields
Use name:FieldType format:
zfold scaffold shop Product name:CharField price:DecimalField in_stock:BooleanField
Common types: CharField, TextField, IntegerField, BooleanField, DateTimeField, DecimalField, EmailField, SlugField, ForeignKey
Any valid Django field type is accepted.
Options
| Flag | Effect |
|---|---|
--force |
Overwrite existing files |
--help |
Show help |
--version |
Show version |
Naming Conventions
| Element | Format | Example |
|---|---|---|
| App | lowercase | blog, my_shop |
| Model | PascalCase | Post, OrderItem |
| Field | snake_case | title, created_at |
Generated Templates
Zfold generates styled, responsive HTML templates:
- List view — Table with all records, empty state
- Detail view — Single record with edit/delete actions
- Form view — Create and update forms with styling
- Delete confirmation — Confirm before deleting
Templates extend base.html which you can customize. No CSS framework dependencies—styles are included inline.
Example Workflow
# Create a blog app
zfold scaffold blog Post title:CharField content:TextField
# Add another model to the same app
zfold generate model blog Comment body:TextField
# Regenerate templates after changing fields
zfold --force generate template blog Post
Documentation
Full documentation: github.com/zaidanch/zfold
License
MIT
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zfold-0.2.0-py3-none-win_amd64.whl.
File metadata
- Download URL: zfold-0.2.0-py3-none-win_amd64.whl
- Upload date:
- Size: 338.0 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b32cf58b8b7f5bc6a9f68b3eae397bd79986e2e7a3e7158c94978459662a25a2
|
|
| MD5 |
6278fa934b1dfb9df1b5b05758699210
|
|
| BLAKE2b-256 |
7671f2102dacb5e3daf4a7030c698b294dd2b9743b523a9d33a6468dd66b7a67
|
Provenance
The following attestation bundles were made for zfold-0.2.0-py3-none-win_amd64.whl:
Publisher:
release.yml on zaidanch/zfold
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zfold-0.2.0-py3-none-win_amd64.whl -
Subject digest:
b32cf58b8b7f5bc6a9f68b3eae397bd79986e2e7a3e7158c94978459662a25a2 - Sigstore transparency entry: 1571546139
- Sigstore integration time:
-
Permalink:
zaidanch/zfold@2f8fc94f92c22a3e75c9ea7e53d92c8bb24f0889 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zaidanch
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f8fc94f92c22a3e75c9ea7e53d92c8bb24f0889 -
Trigger Event:
push
-
Statement type:
File details
Details for the file zfold-0.2.0-py3-none-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: zfold-0.2.0-py3-none-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 485.7 kB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4607fe7c61e092d7f0049cee38c204359abab073877d96b89f3e84e1ff2c78aa
|
|
| MD5 |
2f3749b221f082398c09ab378fe5d0df
|
|
| BLAKE2b-256 |
ba23539007c10c6b901ef25ce941439b35490b15dd237073809eeee7f3094f27
|
Provenance
The following attestation bundles were made for zfold-0.2.0-py3-none-manylinux_2_17_x86_64.whl:
Publisher:
release.yml on zaidanch/zfold
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zfold-0.2.0-py3-none-manylinux_2_17_x86_64.whl -
Subject digest:
4607fe7c61e092d7f0049cee38c204359abab073877d96b89f3e84e1ff2c78aa - Sigstore transparency entry: 1571546070
- Sigstore integration time:
-
Permalink:
zaidanch/zfold@2f8fc94f92c22a3e75c9ea7e53d92c8bb24f0889 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zaidanch
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f8fc94f92c22a3e75c9ea7e53d92c8bb24f0889 -
Trigger Event:
push
-
Statement type:
File details
Details for the file zfold-0.2.0-py3-none-manylinux_2_17_aarch64.whl.
File metadata
- Download URL: zfold-0.2.0-py3-none-manylinux_2_17_aarch64.whl
- Upload date:
- Size: 469.2 kB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d864712cf3e777f77ef08752207a7c495e35772d0a46c5f87272e8811b01861
|
|
| MD5 |
d13afe5d1b13d70ca575d0453817f74d
|
|
| BLAKE2b-256 |
77627ea6906d2fc05f97b701adaf6261ca4d821a8584c77c6955bd1e910af5cd
|
Provenance
The following attestation bundles were made for zfold-0.2.0-py3-none-manylinux_2_17_aarch64.whl:
Publisher:
release.yml on zaidanch/zfold
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zfold-0.2.0-py3-none-manylinux_2_17_aarch64.whl -
Subject digest:
7d864712cf3e777f77ef08752207a7c495e35772d0a46c5f87272e8811b01861 - Sigstore transparency entry: 1571545989
- Sigstore integration time:
-
Permalink:
zaidanch/zfold@2f8fc94f92c22a3e75c9ea7e53d92c8bb24f0889 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zaidanch
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f8fc94f92c22a3e75c9ea7e53d92c8bb24f0889 -
Trigger Event:
push
-
Statement type:
File details
Details for the file zfold-0.2.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: zfold-0.2.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 445.6 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2ed24285c64efe43f3ff97b1db9f03fb61b1b5f39ace5e5b086fa2df5d8070a
|
|
| MD5 |
856b23b1861417ea1d414cf4a758315e
|
|
| BLAKE2b-256 |
ebe4ebf70c52eb9c0f880549717922fbb8c2bd0a2e21b2b97d45eba7d4e46b0a
|
Provenance
The following attestation bundles were made for zfold-0.2.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on zaidanch/zfold
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zfold-0.2.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
c2ed24285c64efe43f3ff97b1db9f03fb61b1b5f39ace5e5b086fa2df5d8070a - Sigstore transparency entry: 1571545927
- Sigstore integration time:
-
Permalink:
zaidanch/zfold@2f8fc94f92c22a3e75c9ea7e53d92c8bb24f0889 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zaidanch
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f8fc94f92c22a3e75c9ea7e53d92c8bb24f0889 -
Trigger Event:
push
-
Statement type:
File details
Details for the file zfold-0.2.0-py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: zfold-0.2.0-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 461.8 kB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3565a19bfe0d7a242a7e211b01c4865f7670876d97c57a6cb7291894b71dd32a
|
|
| MD5 |
2bc299d89d2e64c208376cedaaf36ce3
|
|
| BLAKE2b-256 |
674dae50196d722431ac5206adfd880d803884917b3d0be76ad17ef3783fb5d7
|
Provenance
The following attestation bundles were made for zfold-0.2.0-py3-none-macosx_10_9_x86_64.whl:
Publisher:
release.yml on zaidanch/zfold
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zfold-0.2.0-py3-none-macosx_10_9_x86_64.whl -
Subject digest:
3565a19bfe0d7a242a7e211b01c4865f7670876d97c57a6cb7291894b71dd32a - Sigstore transparency entry: 1571546106
- Sigstore integration time:
-
Permalink:
zaidanch/zfold@2f8fc94f92c22a3e75c9ea7e53d92c8bb24f0889 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/zaidanch
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2f8fc94f92c22a3e75c9ea7e53d92c8bb24f0889 -
Trigger Event:
push
-
Statement type: