mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
This commit is contained in:
parent
f6acd1d271
commit
7b2f2e74ad
213 changed files with 574 additions and 763 deletions
|
@ -5,7 +5,6 @@ import os
|
|||
|
||||
from django.core.files.uploadedfile import UploadedFile
|
||||
from django.http import HttpResponse, HttpResponseServerError
|
||||
from django.utils import six
|
||||
from django.utils.encoding import force_bytes, force_str
|
||||
|
||||
from .models import FileModel
|
||||
|
@ -19,7 +18,7 @@ def file_upload_view(request):
|
|||
"""
|
||||
form_data = request.POST.copy()
|
||||
form_data.update(request.FILES)
|
||||
if isinstance(form_data.get('file_field'), UploadedFile) and isinstance(form_data['name'], six.text_type):
|
||||
if isinstance(form_data.get('file_field'), UploadedFile) and isinstance(form_data['name'], str):
|
||||
# If a file is posted, the dummy client should only post the file name,
|
||||
# not the full path.
|
||||
if os.path.dirname(form_data['file_field'].name) != '':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue