if request.method == 'POST':
try:
form = ExampleForm(request.POST,
instance=Example.objects.get(user=request.user))
except:
form = ExampleForm(request.POST)
if form.is_valid():
m = form.save(commit=False)
is_ok = request.POST.get('is_ok')
m.is_ok = is_ok
m.user = request.user
m.save()
How to add field is_ok to instance=Example.objects.get(user=request.user)
Note: I can not add this field to the model forms.
If I change existing data, my is_ok value changes to default
EDIT:
<input type="checkbox" disabled="disabled" checked="checked" name="is_ok" id="id_is_ok"/>
If this input is disabled, my is_ok = request.POST.get('is_ok') = None