Ticket #1222: create_update.diff
File create_update.diff, 858 bytes (added by , 19 years ago) |
---|
-
create_update.py
1 1 from django.core.xheaders import populate_xheaders 2 2 from django.template import loader 3 from django.core import formfields, meta 3 from django.core import formfields 4 from django.db.models import FileField 4 5 from django.views.auth.login import redirect_to_login 5 6 from django.template import RequestContext 6 7 from django.core.paginator import ObjectPaginator, InvalidPage … … 26 27 # If data was POSTed, we're trying to create a new object 27 28 new_data = request.POST.copy() 28 29 29 if model._meta.has_field_type( meta.FileField):30 if model._meta.has_field_type(FileField): 30 31 new_data.update(request.FILES) 31 32 32 33 # Check for errors