replying to myself

On 23-Apr-08, at 2:28 PM, Kenneth Gonsalves wrote:

> class Ingredientrecform(forms.ModelForm):
>      """
>      Form to add Ingredients.
>      """
>      def __init__(self,pageid, *args, **kwargs):
>              super(Ingredientrecform, self).__init__(*args, **kwargs)
>              self.pageid = pageid
>              ingredient = forms.ModelChoiceField
> (queryset=Ingredient.objects.extra(
>                  where=["""id not in (select ingredient_id from
> web_recipeingredient\
>                  where recipe_id = %s)""" % self.pageid]))

it should be self.fields['ingredient'] and not 'ingredient'

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/code/




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to