On Wed, 2008-01-09 at 03:29 -0800, [EMAIL PROTECTED] wrote:
> Hi can anyone help me Im trying to do a filter on my form to filter an
> email my code is a s follows any help on why this is not working will
> be greatly appreciated

You didn't what the problem you are seeing is, but I think I can guess
in any case...

[...]
> def competition(request):
>     EntryForm = forms.models.form_for_model(Details)
>     EntryForm.base_fields['country'].widget =
> forms.Select(choices=COUNTRIES)
>     if request.method == 'POST':
>         object = None
>         form = EntryForm(request.POST)
>         if form.is_valid():
>             try:
>                 object =
> Details.objects.filter(email=form['email'])     # THIS THE THE PROBLEM
> LINE

form['email'] will be a BoundField class. Instead,
form.cleaned_data['email'] will be the normalised email address.

Regards,
Malcolm

-- 
If you think nobody cares, try missing a couple of payments. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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