wadofstuff-django-viewsInlines support for Django generic views. | |
Download |
wadofstuff-django-views Ranking & Summary
Advertisement
wadofstuff-django-views Tags
wadofstuff-django-views Description
Inlines support for Django generic views. wadofstuff-django-views is a set of view functions and classes to extend the functionality of Django's generic views to support inlines.Functions:wadofstuff.django.views.create_object(..., inlines=None)--------------------------------------------------------wadofstuff.django.views.update_object(..., inlines=None)--------------------------------------------------------These functions are identical to the Django ones except for the addition of the `inlines` argument. This argument consists of a list of dictionaries that will be passed as arguments after the `parent_model` argument to `inlineformset_factory(parent_model, ...)`.For example, arguments to a generic view might typically look like:crud_dict = { 'model':Author 'inlines':, # ... other generic view arguments}would translate to calls to `inlineformset_factory()` like: inlineformset_factory(Author, model=Book, extra=2, form=BookForm)and inlineformset_factory(Author, model=Article)The view function will create a formset for each inline model and add them to the template context. In the example above the context variables would be named `book_formset` and `article_formset`. Requirements: · Python · Django What's New in This Release: · Added ability to import views from wadofstuff.django.views.
wadofstuff-django-views Related Software