django forms exclude fields on init rather than in the meta class

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2010-05-13T11:50:57Z Indexed on 2010/05/13 11:54 UTC
Read the original article Hit count: 149

Filed under:
|

Hi,

I want to exclude certain fields in the init function of a modelform depending on a parameter passed in, how do I do this? I know I can add exclude fields using the meta class of a model form but I need this to be dynamic depending on the variable passed in.

Thanks

© Stack Overflow or respective owner

Related posts about django

Related posts about django-forms