Re: In forms, how add dynamic initial values out of reach for clients?

2008-11-17 Thread dexter
I've already read that and can't get the first one working: instance = Instance(required_field='value') form = InstanceForm(request.POST, instance=instance) new_instance = form.save() In my case, shouldn't it look like this: user = request.user discussion =

Re: In forms, how add dynamic initial values out of reach for clients?

2008-11-16 Thread David Zhou
On Mon, Nov 17, 2008 at 1:24 AM, dexter <[EMAIL PROTECTED]> wrote: > > I want logged in users to be able to add comments but only want some > of the formfields displayed. Fields 'user', 'date' and 'discussion' > should be out of reach for my sitevisitors/clients. > ... > How should i solve this?

In forms, how add dynamic initial values out of reach for clients?

2008-11-16 Thread dexter
I want logged in users to be able to add comments but only want some of the formfields displayed. Fields 'user', 'date' and 'discussion' should be out of reach for my sitevisitors/clients. #models.py: class Comment(models.Model): user = models.ForeignKey(User) date =