> > >> number_of_meds = kwargs.pop('number_of_meds', 4) > > This is how I optionally passed the number of > fields I wanted to display in the form. If there's > no 'number_of_meds' in kwargs, a minimum of 4 fields > are displayed. The trick is to use kwargs.pop() before > super is called, or you'll get an unexpected keyword > argument error. > > It's possible that you may be able to determine the > number of fields from your passed data_dict and bypass > my kwargs.pop hack altogether. > > -- > Jeff Bauer > Rubicon, Inc.
Jeff, Thanks again. Because I didn't fullyunderstand use of the stack, I chose to pass the number of records from the queryset in the dictionary. It means I had to explicitly name the dictionary in the Form class, which may cause a problem with reuse from other views, but it works well. Can you point me to documentation on the use of the pop *kwargs and 'Super' as I'd like to read up on these to understand better. Thanks for all your help. Tim --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---