2
我想運行一個應用程序,它使用django(版本1.6.5)rest框架(python版本3.4.5)。但是我得到導入錯誤「無法導入名稱DurationField 「。我該如何解決這個錯誤?ImportError:無法導入名稱'DurationField'
File "/usr/src/app/Lab/models.py", line 8, in <module>
from Lab import logic, common <br>
File "/usr/src/app/Lab/logic.py", line 16, in <module>
from Rest import viewsAppComm <br>
File "/usr/src/app/Rest/viewsAppComm.py", line 7, in <module>
from rest_framework.response import Response <br>
File "/usr/local/lib/python3.4/site-packages/rest_framework/response.py", line 13, in <module>
from rest_framework.serializers import Serializer
File "/usr/local/lib/python3.4/site-packages/rest_framework/serializers.py", line 19, in <module>
from django.db.models import DurationField as ModelDurationField <br>
ImportError: cannot import name 'DurationField'
非常感謝您的幫助! – Yoga