ModuleNotFoundError: No module named 'django.core.urlresolvers'
修改site-packages\xadmin-0.6.1-py3.6.egg\xadmin\models.py
將from django.core.urlresolvers import NoReverseMatch, reverse修改為from django.urls import NoReverseMatch, reverse
TypeError: __init__() missing 1 required positional argument: 'on_delete'
把content_type = models.ForeignKey(ContentType)修改為content_type = models.ForeignKey(ContentType,on_delete=models.CASCADE)
TypeError: __init__() takes 1 positional argument but 6 were given
把forms.Field.__init__(self, required, widget, label, initial, help_text, *args, **kwargs) 修改成forms.Field.__init__(self)
AttributeError: 'Settings' object has no attribute 'MIDDLEWARE_CLASSES'
把:
if settings.LANGUAGES and 'django.middleware.locale.LocaleMiddleware' in settings.MIDDLEWARE_ClASSES:
改成:
if settings.LANGUAGES and 'django.middleware.locale.LocaleMiddleware' in settings.MIDDLEWARE:
ModuleNotFoundError: No module named 'django.contrib.formtools'
pip uninstall django-formtools
pip install django-formtools==2.1
ImportError: cannot import name 'QUERY_TERMS'
在Django2.0版本中把from django.db.models.sql.query import LOOKUP_SEP, QUERY_TERMS修改為:
from django.db.models.sql.query import LOOKUP_SEP
from django.db.models.sql.constants import QUERY_TERMS
在Django2.1.1版本中把from django.db.models.sql.query import LOOKUP_SEP, QUERY_TERMS修改為:
from django.db.models.sql.query import LOOKUP_SEP, Query
標題名稱:Django2.1.1與xadmin0.6.0遇到的坑
文章來源:http://muchs.cn/article48/joocep.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供動態(tài)網(wǎng)站、全網(wǎng)營銷推廣、服務(wù)器托管、軟件開發(fā)、關(guān)鍵詞優(yōu)化、微信小程序
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)