Reset static variables or a workaround

Chris Rebert clp2 at rebertia.com
Thu Feb 23 10:43:42 CET 2012


On Thu, Feb 23, 2012 at 1:26 AM, Nav <navkirats at gmail.com> wrote:
> Hi Guys,
>
> I have a custom user form class, it inherits my own custom Form class:
>
> class UserForm(Form):
>    first_name = TextField(attributes={id='id_firstname'})
>
> Now, everytime UserForm() is instantiated it saves the attributes of
> each form members and passes it on to the new instance. I understand
> this is because first_name is static in nature. But I would like to
> reset the first_name for every instance? How can I do this?

I infer that your question concerns Django. You might want to ask on
their discussion group instead:
http://groups.google.com/group/django-users

Cheers,
Chris



More information about the Python-list mailing list