It is a common practice to pass extra parameters to the __init__
function of the form and save them as properties of the object that
can be later on accessed by any method like the clean method:

class MyForm(forms.Form):

    def __init__(self, extra_param=None, *args, **kwargs):
        self.extra_param = extra_param
        super(MyForm, self).__init__(*args, **kwargs)

    def clean(self):
        # access your extra param with self.extra_param

I don't know if is this what you are looking for...

H.
http://nomadblue.com/

On Oct 13, 5:53 am, valhalla <rjkers...@gmail.com> wrote:
> I am trying to figure out a pythonic way of passing data between the
> forms of a formwizard.
> I can do it with inital data but I need to access the data in the
> clean method of the form.
>
> The only ways I can get working are really messy and wont scale
> easily.
>
> Any suggestions out there?
--~--~---------~--~----~------------~-------~--~----~
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