mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
magic-removal: Fixed #1222
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1958 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9ab24d4939
commit
90baed7dd5
@ -1,6 +1,7 @@
|
|||||||
from django.core.xheaders import populate_xheaders
|
from django.core.xheaders import populate_xheaders
|
||||||
from django.template import loader
|
from django.template import loader
|
||||||
from django import forms
|
from django import forms
|
||||||
|
from django.db.models import FileField
|
||||||
from django.views.auth.login import redirect_to_login
|
from django.views.auth.login import redirect_to_login
|
||||||
from django.template import RequestContext
|
from django.template import RequestContext
|
||||||
from django.core.paginator import ObjectPaginator, InvalidPage
|
from django.core.paginator import ObjectPaginator, InvalidPage
|
||||||
@ -26,7 +27,7 @@ def create_object(request, model, template_name=None,
|
|||||||
# If data was POSTed, we're trying to create a new object
|
# If data was POSTed, we're trying to create a new object
|
||||||
new_data = request.POST.copy()
|
new_data = request.POST.copy()
|
||||||
|
|
||||||
if model._meta.has_field_type(meta.FileField):
|
if model._meta.has_field_type(FileField):
|
||||||
new_data.update(request.FILES)
|
new_data.update(request.FILES)
|
||||||
|
|
||||||
# Check for errors
|
# Check for errors
|
||||||
|
Loading…
x
Reference in New Issue
Block a user