admin中增加用户时报错

来源:5-1 django admin介绍

浓浓茶82

2017-03-08

TypeError at /admin/users/userprofile/add/

coercing to Unicode: need string or buffer, instancemethod found
     

Request Method:

POST    

Request URL:

http://127.0.0.1:8000/admin/users/userprofile/add/    

Django Version:

1.9    

Exception Type:

TypeError    

Exception Value:

coercing to Unicode: need string or buffer, instancemethod found
   

Exception Location:

C:\Users\Lenovo\Envs\mxonline\lib\site-packages\django\utils\encoding.py in force_text, line 78    

Python Executable:

C:\Users\Lenovo\Envs\mxonline\Scripts\python.exe    

Python Version:

2.7.13    

Python Path:

['C:\\Users\\Lenovo\\PycharmProjects\\MxOnline\\apps',
'C:\\Users\\Lenovo\\PycharmProjects\\MxOnline',
'C:\\Users\\Lenovo\\PycharmProjects\\MxOnline',
'C:\\Users\\Lenovo\\PycharmProjects\\MxOnline\\apps',
'C:\\Windows\\system32\\python27.zip',
'C:\\Users\\Lenovo\\Envs\\mxonline\\DLLs',
'C:\\Users\\Lenovo\\Envs\\mxonline\\lib',
'C:\\Users\\Lenovo\\Envs\\mxonline\\lib\\plat-win',
'C:\\Users\\Lenovo\\Envs\\mxonline\\lib\\lib-tk',
'C:\\Users\\Lenovo\\Envs\\mxonline\\Scripts',
'd:\\python27\\Lib',
'd:\\python27\\DLLs',
'd:\\python27\\Lib\\lib-tk',
'C:\\Users\\Lenovo\\Envs\\mxonline',
'C:\\Users\\Lenovo\\Envs\\mxonline\\lib\\site-packages']
   


写回答

2回答

bobby

2017-03-08

先不要着急添加用户 等到看完第13章就明白了

1
0

浓浓茶82

提问者

2017-03-10

好的,谢谢。

0
0

Python3.6+django+xadmin,打造在线教育平台

【毕设】Python 2.7到3.6 完美适配,Django升级2.0

3677 学习 · 4038 问题

查看课程