A little Django app to reduce boilerplate code at a minimum when you write class based views in a typical CRUD scenario.
Django compatibility
The app is tested on Django 1.8 and 1.11.
Dependencies:
The app depends on django-crispy-forms to generate forms and includes a static version of Datatables and Bootstrap Datepicker to provide client side enhancements to tables and forms.
Install:
pip install django-lazycrud
Then add lazycrud and crispy_forms to your INSTALLED_APPS in Django settings.
Example:
Define your CRUD views with few lines of Python code
No need to write any html code, let lazycrud handle all the templates for you.
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView
from django.core.urlresolvers import reverse_lazy
from .models import Model
class ModelListView(ListView):
model = Model
template_name = 'lazycrud/object_list.html'
page_title = 'My Model list'
fields = [ 'model_field1', 'model_field2', ]
create_url = reverse_lazy('yourapp:model_create')
create_label = 'Create new Model'
class ModelDetailView(DetailView):
model = Model
template_name = 'lazycrud/object_detail.html'
fields = [ 'model_field1', 'model_field2', 'model_field3', ]
update_url = 'yourapp:model_update'
delete_url = 'yourapp:model_delete'
class ModelCreateView(CreateView):
model = Model
template_name = 'lazycrud/object_form.html'
form_title = 'Create new Model'
fields = [ 'model_field1', 'model_field2', 'model_field3', ]
class ModelUpdateView(UpdateView):
model = Model
template_name = 'lazycrud/object_form.html'
form_title = 'Edit Model'
fields = ModelCreateView.fields
class ModelDeleteView(DeleteView):
model = Model
template_name = 'lazycrud/object_confirm_delete.html'
success_url = reverse_lazy('yourapp:model_list')
Metadata
Release files for django-lazycrud 1.9.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 | Provenance | Actions |
|---|---|---|---|---|
| django_lazycrud-1.9.0.tar.gz | 290.7 kB | Without provenance | Details for django_lazycrud-1.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_lazycrud-1.9.0-py3-none-any.whl | Python 3 | none | any | Details for django_lazycrud-1.9.0-py3-none-any.whl |
Total release size: 599.6 kB
Release files / django_lazycrud-1.9.0.tar.gz
| Download URL | django_lazycrud-1.9.0.tar.gz |
|---|---|
| Size | 290.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4fd3064e6ba27851f330ba0e98f5792e3197e91058806e23053384e6fffb96c
|
|
BLAKE2b-256 checksum How to use checksums |
9b14e2f99f6f35570a8114f354623b791f08a2d43ce6de8a31874baf9ca799df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / django_lazycrud-1.9.0-py3-none-any.whl
| Download URL | django_lazycrud-1.9.0-py3-none-any.whl |
|---|---|
| Size | 309.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a24e56da98b8d04f04a3e9baea5c138deeee1b46d1cd59d020d47900fad9577
|
|
BLAKE2b-256 checksum How to use checksums |
e35836b1ee84ee6b1fcab929b5ef0152a5253f924f6b61881fc54eb87b7ae9fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for django-lazycrud 1.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.