django-args¶
django-args
is the Django
wrapper on python-args.
python-args
provides the ability to decorate functions with validators,
context, and default value processors. django-args
takes this a
step further, allowing any function decorated with python-args
to
seamlessly integrate with Django form views and form wizards.
Quick Start¶
django-args
provides the following core views, which we cover in-depth
in the ref:django-args tutorial:
djarg.views.FormView
- For constructing a form view on apython-args
function.djarg.views.WizardView
- For constructing a django-formtools form wizard on apython-args
function.
Each one of these views has additional extensions for easily constructing views on top of models. Here are a few:
djarg.views.ObjectFormView
- For form views on a single object.djarg.views.ObjectsFormView
- For form views on multiple objects.djarg.views.ObjectWizardView
- For wizards on a single object.djarg.views.ObjectsWizardView
- For wizards on multiple objects.
django-args
also provides several utilities to facilitate Django integration
with python-args
functions:
The
djarg.qset
utility is apython-args
lazy loader and allows users to lazily load a queryset for a function.The
djarg.views.SuccessMessageMixin
mimics Django’sSuccessMessageMixin
for form views, but it is compatible with alldjango-args
views.
In order to get started, first go through the installation instructions. Then head on to the django-args tutorial.