Re: Is a model method the answer?

2011-05-26 Thread piker
direction.Cheers. On May 26, 7:58 pm, piker wrote: > Thanks Roald, > By "b_set" do you mean that I have to create a queryset instance? If > so, I should place it just above the function? > > On May 26, 7:21 pm, Roald wrote: > > > > > > > > > On May 26,

Re: Is a model method the answer?

2011-05-26 Thread piker
Thanks Roald, By "b_set" do you mean that I have to create a queryset instance? If so, I should place it just above the function? On May 26, 7:21 pm, Roald wrote: > On May 26, 11:07 am, piker wrote: > > > I have a model class (A) that has a  M2M field with its relationshi

Is a model method the answer?

2011-05-26 Thread piker
I have a model class (A) that has a M2M field with its relationship to another model (B). When I save an instance of model class (A) I want to automatically update a BooleanField in all the many, related model(B) instances at the same time. Is the right way to do this through a Model Method? If so

Re: modelformset_factory instance not saving

2011-05-19 Thread piker
Thanks for the reply. formset.is_valid returns False but formset.errors returns an empty list.The same applies for the SpeciesFormSet.What would this suggest? Cheers. On May 19, 7:04 pm, Daniel Roseman wrote: > On Wednesday, May 18, 2011 11:46:14 PM UTC+1, piker wrote: > > &

modelformset_factory instance not saving

2011-05-18 Thread piker
I have a modelformset_factory instance displaying beautifully, but not saving to the database. If anyone can spot any mistake i've made in the code it would be much appreciated.(i'm using Django 1.3 by the way). def warning_entry (request): SpeciesFormSet = modelformset_factory(Species,fields=

Re: Need help with a form instance

2011-05-18 Thread piker
)) On May 18, 9:33 pm, Oleg Lomaka wrote: > You need > ModelFormSet<http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#model-f...>. > By default, it creates forms for all models from given queryset. > > > > > > > > On Wed, May 18, 2011 at 12:20 PM, piker

Need help with a form instance

2011-05-18 Thread piker
Ok, I've managed to create a ModelForm instance that enables me to input totally new items into the database, but i'm at a loss to work out how to display all the existing items in a model, on one page, edit them and submit them in one save(). Is that possible? I'd really appreciate some help here