I think the problem is that your form doesn't have all the required
data. When you assign the instance, you provide initial data, and
something for form.save to modify. However, when the data is posted
back, It looks like maybe the non-editable fields aren't in the POST
data. You could add the fields you don't want edited as readonly on
the front end, then do validation like this:
http://stackoverflow.com/questions/324477/in-a-django-form-how-to-make-a-field-readonly-or-disabled-so-that-it-cannot-be#answer-331550

I'm only guessing since I don't think you showed your forms.py or
template code.

Hope that helps,
Alex

On Aug 16, 8:14 am, Mess <bauerna...@gmail.com> wrote:
> Sorry, I had cut out some unimportant parts of the view causing that
> error. The update_contract is called from another method only if it is
> a POST.
>
> My main issue is that it works as it should when logged in as admin
> (probably because all the fields are in the admin version of the
> form). But when logged in as external user and using different form
> with only some of the fields, I get missing fields error. But the
> contract_form still contains the data from all the fields.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to