sshwsfc / xadmin

Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.
http://www.xadmin.io
BSD 3-Clause "New" or "Revised" License
4.76k stars 1.41k forks source link

对python的版本有要求吗?我使用python3,报错 #197

Open zhijiasun opened 10 years ago

zhijiasun commented 10 years ago

使用python3,报如下错误: File "python3.3/site-packages/xadmin/sites.py", line 8, in reload(sys) NameError: name 'reload' is not defined

python3中reload不是内置的

the5fire commented 10 years ago

使用2.7吧

iCraneZhou commented 7 years ago

只支持2.7.x,我也刚碰到了

williamcullen commented 7 years ago

听说是支持python3的 要是因为个xadmin 就换成python2太不值了(听说python3会鄙视python2) hhahah 不知到那位大神能搞定这个

williamcullen commented 7 years ago

楼主可以改成这个 把utf8换成 import importlib importlib.reload(sys)

iCraneZhou commented 7 years ago

里面都有python 2.x print语法,除了重构重写,才能支持python 3.x.

iphysresearch commented 7 years ago

You probably wanted imp.reload().

from imp import reload

In Python 2.x, this was a builtin, but in 3.x, it's in the imp module.