hi all!
I am really new to Django, and at the moment I have project which is
something like giving feedback to mates for specific task like
tutorial/assignement..
And I have a problem with the formset_factory. Any time when I try to
save the form it appears the error:
(Hidden field id) Map_marking with this None already exists.
which map_marking is my model
And this is my code in views:
map_marking_formset = modelformset_factory(map_marking, max_num =
count,fields = ('peer_answer','feedback','mark'))
if request.method == 'POST':
formset = map_marking_formset(request.POST, request.FILES,
queryset = map_marking.objects.filter(studentid = user.username,
itemid = get_current_item()))
if formset.is_valid():
formset.save()
else:
formset = map_marking_formset()
The code looks obvious for me, I dunt know why the error come from.
Deeply appreciate for any helps or hints to kills the error
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@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
-~--~~~~--~~--~--~---