Ticket #816: create_update.py.diff
File create_update.py.diff, 862 bytes (added by , 19 years ago) |
---|
-
create_update.py
old new 1 1 from django import models 2 2 from django.core.xheaders import populate_xheaders 3 from django.core import template_loader, formfields 3 from django.core import template_loader, formfields, meta 4 4 from django.views.auth.login import redirect_to_login 5 5 from django.core.extensions import DjangoContext as Context 6 6 from django.core.paginator import ObjectPaginator, InvalidPage … … 26 26 if request.POST: 27 27 # If data was POSTed, we're trying to create a new object 28 28 new_data = request.POST.copy() 29 30 opts = mod.Klass._meta 31 if opts.has_field_type(meta.FileField): 32 new_data.update(request.FILES) 29 33 30 34 # Check for errors 31 35 errors = manipulator.get_validation_errors(new_data)