이 코드의 .py 파일의 첫 번째 줄은 오류를 반환합니다.__init __() python/django에서 예상치 못한 키워드 인수 'mime'이 표시됩니다.
mime = magic.Magic(mime=True)
content_type = mime.from_buffer((data).read(1024))
request.session['content_type'] = content_type
if content_type == 'application/pdf' or content_type == 'application/msword':
request.session['upload_status'] = "Content type is valid according to (MAGIC)"
오류 메시지는 내가 장고 1.4.1 파이썬 2.7.3 사용하고 __init__() got an unexpected keyword argument 'mime'
입니다. Magic이 설치되어 있습니다. 아무런 단서가 잘못되어 - 어떤 도움을 주셔서 감사합니다!
는 (진정한 마임 =) 매직 것입니다 당신이'__init__' 방법을 보여줄 수와 파이썬 2.7.3를 사용하고 있습니다
을 매직 모델 – karthikr
은 ctrl-k를 사용하여 코드 블록을 표시합니다. – swang
감사의 말씀, 그것을 명심하십시오! :) – user1678031