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 =
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?
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 =
3 matches
Mail list logo