Posts Tagged ‘django’

django上传图片问题

Monday, May 30th, 2011

最近这个在admin上传图片的东西搞的我非常郁闷,求教了很多人,查了很多资料。知道问题出在setting.py中的路径,但是怎么着改都有问题,今晚实在没辙就完全推倒重做,又仔细的分析了一遍media_root,media_url,static_root,static_url,admin_media_prefix。参考帮助文档,终于搞定,mark一下。 (more…)

django学习记录1

Sunday, May 29th, 2011

Django报错UnicodeEncodeError: ‘ascii’ codec can’t encode characters 之解决方法!
how-to:
编码问题。Change the __str__ methods on your models to be __unicode__ methods. Just change the name. Usually, nothing else will be needed.   (more…)