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-argsfunction.djarg.views.WizardView- For constructing a django-formtools form wizard on apython-argsfunction.
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.qsetutility is apython-argslazy loader and allows users to lazily load a queryset for a function.The
djarg.views.SuccessMessageMixinmimics Django’sSuccessMessageMixinfor form views, but it is compatible with alldjango-argsviews.
In order to get started, first go through the installation instructions. Then head on to the django-args tutorial.