Re: access request.user in class Meta

2008-11-03 Thread bruno desthuilliers
On 1 nov, 23:57, Merrick <[EMAIL PROTECTED]> wrote: > I am trying to dynamically generate a form, the fields will vary if > the user is logged in. Here is where I am so far > > forms.py > == > class LinkForm(ModelForm): > > def __init__(self, *args, **kw): > self.request =

access request.user in class Meta

2008-11-01 Thread Merrick
I am trying to dynamically generate a form, the fields will vary if the user is logged in. Here is where I am so far forms.py == class LinkForm(ModelForm): def __init__(self, *args, **kw): self.request = kw.pop('request') super(LinkForm, self).__init__(*args, **kw)