Re: Set formfield.initial when created using modelformset_factory

2018-05-23 Thread Brock Hallenbeck
Thanks Collin, that does help. I guess I am going to have to take a fundamentally different approach to accomplish what I want. I have attempted to make an AJAX solution for foreign key dropdowns with >1000 options by creating a subclass of ModelChoiceField. By also subclassing its iterator

Re: Set formfield.initial when created using modelformset_factory

2018-05-23 Thread Collin Anderson
Hi Brock, Yes, that's the intended behavior, and you can see the same behavior on a regular form, without using formsets, which might make it a little more clear what's going on: class MyForm(forms.Form): name = forms.CharField() form = MyForm(initial={'name': 'test'}) form.initial #yields

Set formfield.initial when created using modelformset_factory

2018-05-23 Thread Brock Hallenbeck
When creating a formset using modelformset_factory and passing in a list of dictionaries to use as initial values, those values can be retrieved from the relevant form, and the relevant boundfield on that form. However the formfield class itself has no knowledge of that initial data. Is this

Server side connection of sock-js in the same Django app

2018-05-23 Thread Rakesh Reddy
I'm trying to implement SockJs on the server side to recieve data of the client application. can someone guide me as to how to add the server side of sockjs to the same Django app? I'm a newbie to Django and it's getting real hard to implement this. -- You received this message because you