Ticket #2254: create_update.patch
File create_update.patch, 1.6 KB (added by , 18 years ago) |
---|
-
create_update.py
10 10 11 11 def create_object(request, model, template_name=None, 12 12 template_loader=loader, extra_context=None, post_save_redirect=None, 13 login_required=False, follow=None, context_processors=None): 13 login_required=False, follow=None, context_processors=None, 14 override_dict=None): 14 15 """ 15 16 Generic object-creation function. 16 17 … … 31 32 if model._meta.has_field_type(FileField): 32 33 new_data.update(request.FILES) 33 34 35 if override_dict is not None: 36 new_data.update(override_dict) 37 34 38 # Check for errors 35 39 errors = manipulator.get_validation_errors(new_data) 36 40 manipulator.do_html2python(new_data) … … 74 78 slug_field=None, template_name=None, template_loader=loader, 75 79 extra_context=None, post_save_redirect=None, 76 80 login_required=False, follow=None, context_processors=None, 77 template_object_name='object' ):81 template_object_name='object', override_dict=None): 78 82 """ 79 83 Generic object-update function. 80 84 … … 108 112 new_data = request.POST.copy() 109 113 if model._meta.has_field_type(FileField): 110 114 new_data.update(request.FILES) 115 if override_dict is not None: 116 new_data.update(override_dict) 111 117 errors = manipulator.get_validation_errors(new_data) 112 118 manipulator.do_html2python(new_data) 113 119 if not errors: