> class MyForm(forms.Form):
>     def __init__(self, *args, **kwargs):
>         request = kwargs.pop('request', None)
>         if request:
>             self.request = request
>         super(MyForm, self).__init__(*args, **kwargs)
>
> ... and in the view:
> myform = MyForm(request.POST, request=request)
>
> --
> DR.


ok i don't understand all this (django noob here) but i need to check
the url in a subclass that does specific validation, not in the view
which saves the form.  Basically if they enter a URL and it exists in
the database for another record, I want it to raise a form validation
error and tell the user that the url is in the database for another
record.   is there an easier way to do what is needed?  I'm lost.
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to