Hi ,

I am a newbie in django and come across this problem
Description :-
I have a ModelForm which contain a field
class VisitSetupForm(Form):

list_visit_ids = ModelChoiceField(queryset=Visit.objects.none(),
empty_label='Select Revisit ID',required=False)
Now in the server i want not to load all the objects of table Visit
because its too large so for that i wrote the above queryset but when
the user fills in the form where he select the Visit id objects which
i making it avaiable through ajax .Now when i hit the submit button
the form does not save and it goes to invalid condition.
When i do this
list_visit_ids = ModelChoiceField(queryset=Visit.objects.all(),
empty_label='Select Revisit ID',required=False)
everything works fine on my local but on server the database is huge
and the browser page loads forever
Somehow i want to save that field data(Visit object that the user has
selected) .I have google it but not finding the appropriate way to
implement.I have also seen some __init__ way to overide ,
So can anyone sugggest a proper way to override this and somehow the
Visit objects gets saved.

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to