Py学习  »  问与答

关于Django1.3.1和1.5.1之间的版本问题

易冷天涯 • 11 年前 • 7793 次点击  

刚开始学习Django。看完了Django Book前八章。想找个项目看看。于是CLONE了这个项目:https://github.com/gnemoug/ComPerformance 依照其说明进行搭建环境。不料在python manage.py runserver的时候,出现了匪夷所思的玩意儿。

c:\python27\lib\site-packages\django\conf\__init__.py:221: 
DeprecationWarning: You have no filters defined on the 'mail_
admins' logging handler: adding implicit debug-false-only filter.

ImportError: No module named south

原项目说明是1.3.1版本搭建。我应该怎么改动代码能让它在1.5.1下正常地运行呢?

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/39
 
7793 次点击  
文章 [ 5 ]  |  最新文章 10 年前
一休哥
Reply   •   1 楼
一休哥    10 年前

以前也遇到这遇到,用1.5的骚年伤不起啊

易冷天涯
Reply   •   2 楼
易冷天涯    11 年前

@Django中国社区 Thanks for this idea.

Py站长
Reply   •   3 楼
Py站长    11 年前

在1.5中,你要使用 Use django.views.generic.RedirectView

你看这个 http://stackoverflow.com/questions/15130538/return-redirect-in-django-1-5-throwing-import-exception

易冷天涯
Reply   •   4 楼
易冷天涯    11 年前

@Django中国社区 不好意思,粗心至此,只注意上面那些错误信息,没注意自己没有安装south。 安装以后没有了south的需求提示。上面那些还有。

c:\python27\lib\site-packages\django\conf\__init__.py:221: 
DeprecationWarning: You have no filters defined on the 'mail_
admins' logging handler: adding implicit debug-false-only filter. 
  DeprecationWarning)

Validating models...

0 errors found
April 15, 2013 - 13:58:01
Django version 1.5.1, using settings 'webadmin.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
c:\python27\lib\site-packages\django\conf\urls\defaults.py:3: 
DeprecationWarning: django.conf.urls.defaults is deprecate
d; use django.conf.urls instead
  DeprecationWarning)

然后我看 0 errors 就尝试进了http://127.0.0.1:8000/。500页面的错误信息是这样的。

Could not import django.views.generic.simple.redirect_to. 
Parent module django.views.generic.simple does not exist.
Py站长
Reply   •   5 楼
Py站长    11 年前

你安装了south了吗 http://django-china.cn/topic/11/