Cerco di installare xadmin (è un plugin di django per usare il backoffice con il bootstrap di twitter). Ma quando ho eseguito il mio progetto, ho il seguente errore nel mio terminale PyCharm:AttributeError: l'oggetto 'module' non ha attributo 'setdefaultencoding'
File "C:\Python34\lib\site-packages\xadmin\sites.py", line 10, in <module>
sys.setdefaultencoding("utf-8")
AttributeError: 'module' object has no attribute 'setdefaultencoding'
Questo è l'estratto di codice sorgente da sites.py in plug XAdmin:
import sys
from functools import update_wrapper
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models.base import ModelBase
from django.views.decorators.cache import never_cache
from imp import reload
reload(sys)
sys.setdefaultencoding("utf-8")
Il progetto è in esecuzione con l'interprete Python 3.4 e Django 1.7.1. La versione xadmin è 0.5.0
Cosa posso fare?
Ok, penso che manterrò l'amministratore del django per impostazione predefinita ... Grazie per l'aiuto ragazzi –