django-extra-views and nested formsets

I would like to make use of a nested inline formset using django-extra-views for both create and update. I can implement a typical (non-nested) inline formset without issue. Here is a basic...

Save request.user to an django extra view

Save request.user to an django extra view. The example is from Django-Extra-Views. Seems to be working as the example states. https://django-extra-views.readthedocs.org/en/latest/views.html class...

Change queryset of inlineformset_factory [django-extra-views]

I am using django extra views. How do I change the queryset of product field in forms? My following code works just fine. But it seems to me messy. Is there any better solution? Thanks from...

How To Remove Row in django-extra-views?

In ModelFormSetView how to delete row here is my code how can I manage delete row in Django-extra-views I am trying with ModelFormSetView ``` if formset.deleted_forms: for obj in...

Using django-dynamic-formset with CreateWithInlinesView from django-extra-views - multiple formsets

I got 3 models: class Client(models.Model): first_name = models.CharField(max_length=20) last_name = models.CharField(max_length=40) class Phone(models.Model): number =...

Prepopulating and saving inlines in django-extra-views

I'm using django-extra-views and I wanted to fill a form and its associated inlines with prepopulated data and then save (create object). So far I have: from extra_views import...

Problem with inlines formset using django-extra-views

I'm Having 3 models in my django app: Car, Driver and Access. Each Car has a unique Acces and each Driver has a unique Car. I would like to create objects from all of these models at the same time...

django-extra-views and SortableListMixin configuration confusion

I am using django-extra-views in order to have sortable tables in my Django ListViews. I'm not 100% sure of why I can't get it working, but I've always found working from tests.py difficult wrt...

'Contact.Contact' has no ForeignKey to 'Order.Order' error using django extra views

I'm trying to use django extra views to create an Order with a Contact inline formset but i'm getting the following error : 'Contact.Contact' has no ForeignKey to 'Order.Order'. models.py class...

Update custom user password using UpdateWithInlinesView from django-extra-views app

I have a model 'Admin' related to a (custom) user within a one to one field. To update all the fields I'm using django-extra-views app that basically use Django formset. It works well but for...

Django Inlineformsets - Custom validation with django-extra-views

So I have a question about the form_valid for django-extra-views. I used the CreateWithInlinesView method to create a form with multiple inline formsets. The base form called "Order" contains two...

UpdateWithInlinesView for django-extra-views not working with crispy_forms

I have a Django app with django-extra-views to create and maintain a pair of related models. The set up is as follows: ``` models.py class ModelA(models.Model): # fields def...

How to obtain cleaned_data from a FormSetView (django-extra-views)

I cannot see how to trigger and obtain the cleaned_data from my FormSetView. With a django formset, I would call is_valid() on the formset within a POST'ed response, but not sure how to do that...

form_valid method in django-extra-views. In reality form(s)_valid

I am trying to use Django Extra Views pack to create new entry based on model + inline formset + extra information from the USER model. I know how to do it via function based views but now trying...

Django extra-views for one-to-many relationship

I'm trying to use extra-views for django to create one-to-many relationship. I have a model of item in my shop: class Item(models.Model): name = models.TextField( 'Название...

Django Extra-Views form Validation Errors not showing

Django noob here I´m using Django Extra-Views to create a custom form with two inline-forms. All working properly. I wrote some custom validators for the file-upload formset for filesize and -type...

Django Formset: how to get the current user? (using django-extra-views)

I'm used to collecting the current logged in user in a CreateView and passing it to the form like so: ``` class MakeFantasyTeam(CreateView): form_class = MakeFantasyTeamForm [...] def...

Pip not installing the last Django-extra-views version (0.12.0)

I'm Using Django 2.1.1 with Python 3.6. While using the following pip command: pip install django-extra-views It installs the v.0.11.0 and I don't have the 'Factory' changes, so I can't use...

How to pass a request into an inline form set using django-extra-views

I have a form with an inline form set. What I would like to do is when the user lands on the form, to have his user information (name for example) prepopulated into one of the inlines of the form....

django-extra-views expose InlineFormSet field values into get_context_data() and forms_valid() methods

I would like to get access to fields of the InlineFormSet for consumption into the View. Here is an example based on...

Django Extra Views - Delete "InlineFormset" if condition is met on Update

So I'm using Django Extra Views to set up an orderform which includes both bookings and payments. Employees can create an Order which includes one or several Bookings and optionally include...

I'm using django-extra-views to have 2 forms on 1 page. How should I handle custom logic in form_valid?

Here is my views.py code ``` class AttackItemInline(InlineFormSetFactory): model = AttackItem fields = ['attack_used','attack_image'] factory_kwargs = {'extra': 1} class...

django-extra-views get current user

I am using CreateWithInlinesView from django-extra-views. How would I go about retrieving the current user in this case? I have something like this currently class...

FormSetView save with Django Extra Views

as shown in the following code i am trying to save the formset once it is validated. but i always get object has no attribute 'save'error. its great if someone can help me to use...

django extra views with CreateWithInlinesViews rendering in template

let's say, I have following django code...... views.py from extra_views import CreateWithInlinesView, UpdateWithInlinesView, InlineFormSetFactory class ItemInline(InlineFormSetFactory): ...

How to utilise ID field as url parameter in formset template code (using django-extra-views)

I'm trying to adopt 'extra-views' as an advanced means of handling formsets, and want to have a link on each row of my formset template to redirect to a relevant object-based page, for which I...

Django extra-views: Is there any way to control how they are displayed?

I want every form in a formset to be one bellow another and maybe to add some extra classes and display those images, but I don't have any idea how to do that. They are displayed like this: I...

Django Extra Views, CreateWithInlinesView - how to get InlineFormSet pass to _form.html?

How do I get InlineFormSet to show in my building_form.html? views.py from django.contrib.auth.mixins import LoginRequiredMixin from extra_views import InlineFormSet, CreateWithInlinesView from...

How to search by related model field using django-extra-views?

I got Person object with foreign key to contact model. Contact has first_name field. Howe do I search by that first_name field? models: class Person(models.Model): (...) contact =...

Django generic views extra context

I am trying to use the generic DetailView and add some context there to use in a template. My view looks like class SpecsView(DetailView): model = Specification def...