title: How to use extra field from modelForms to query an object? Django
body: <p>I have the following form:</p>
  
  <pre><code>class Recipe_IngredientForm(forms.ModelForm):
  
  class Meta:
      model = Recipe_Ingredient
      fields = ('quantity', 'quantityUnit')
  
  def __init__(self, *args, **kwargs):
      super(Recipe_IngredientForm, self ).__init__(*args, **kwargs)
      self.fields['ingredient_form'] = forms.CharField()
  </code></pre>
  
  <p>And I'm trying to get the value of this form to search for an object, if it exists, i'll set it to be saved in my model.</p>
  
  <pre><code>def recipe_add_ingredient(request, pk):
   recipe = get_object_or_404(Recipe, pk=pk)
   if request.method == "POST":
       form = Recipe_IngredientForm(request.POST)
       if form.is_valid():
           recipeIngredient = form.save(commit=False)
           recipeIngredient.recipe = recipe
           aux = form.fields['ingredient_form']
           recipeIngredient.ingredient = Ingredient.objects.get(name=aux)
           recipeIngredient.save()
           return redirect('recipe_detail', pk=recipe.pk)
   else:
       form = Recipe_IngredientForm()
   return render(request, 'recipe/recipe_add_ingredient.html', {'form': form})
  </code></pre>
  
  <p>But I get an error when submitting the form: <code>Ingredient matching query does not exist</code>, but it shows that I'm getting a value that exists via GET, and if I query the exact same thing in the shell, it return my object. Any Idea?  </p>