Comments (3)
from extra_views import FormSetView
Hi. The above can be used to render a single formset which is not connected to a model.
Inline formsets only exist for models, as it is the parent model which links the child formsets together.
There isn't a class in this library to do what you've asked.
In order to create a generic view which just has a single form and a few different formsets, create a subclass of django.views.generic.edit.FormView
which has all the same methods as ProcessFormWithInlinesView and ModelFormWithInlinesMixin, with all references to models removed.
Formsets would be represented using BaseFormSetFactory instances. If access to the request object was needed, you'd need to do something like InlineFormSetFactory.
from django-extra-views.
Thanks. Would a class, as my request, be useful in Extra Views, or is it a little too niche?
from django-extra-views.
In my opinion, it probably is too niche. The objective of this package is to replicate the functionality of the Django Admin in generic views and it is outside of that. I also think the formsetfactory constructor classes like BaseFormSetFactory
and InlineFormSetFactory
aren't intuitive to new users and adding more would make the package less comprehensible.
From my personal experience in writing django apps, this has only come up once and it's just simpler to write either a one-off CBV or even a functional view to handle multiple formsets.
from django-extra-views.
Related Issues (20)
- Django version support HOT 1
- missing individual form fields rendering HOT 1
- No tag for 0.14.0 HOT 2
- test_missing_management failure HOT 1
- Switch CI to GitHub Actions HOT 2
- Autocomplete using InlineFormSetFactory HOT 4
- UpdateWithInlinesView Inline Form Ordering HOT 3
- Edit 'error_messages' in 'CreateWithInLinesView' HOT 2
- Using widgets with UpdateWithInlinesView HOT 1
- Passing foreign key data to UpdateWithInlinesView forms via InlineFormSetFactory HOT 1
- Creating and saving new inline forms in an UpdateWithInlinesView-based form. HOT 1
- customise and separate inline template tag
- [Feature] Use slug fields instead of pk in formset templates HOT 3
- How to pass URL Vars to from InlineFormSetFactory (views.py) to ModelForms (forms.py) HOT 6
- setting “python_requires” with ">=3.5" is a better way to declare Python compatibility HOT 1
- form_kwargs and get_form_kwargs for inline forms missing HOT 1
- SearchableListMixin should manage form HOT 1
- Cannot paginate using `ModelFormSetView` HOT 4
- A view inheriting from `UpdateWithInlinesView` return HTTP 200 but not update the object HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-extra-views.