码迷,mamicode.com
首页 > 编程语言 > 详细

python manage.py shell之后的一些错误:

时间:2015-04-10 00:58:42      阅读:398      评论:0      收藏:0      [点我收藏+]

标签:

1. 在执行python manage.py shell之后的一些错误:

wyl@wyl:~/myobject$ python manage.py shell
/usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /home/wyl/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)

Python 2.7.8 (default, Oct 20 2014, 15:05:19) 
Type "copyright", "credits" or "license" for more information.

IPython 2.3.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPythons features.
%quickref -> Quick reference.
help      -> Pythons own help system.
object?   -> Details about object, use object?? for extra details.

In [1]: 

有人说是权限问题,只要执行一下权限设置语句就OK了,可是我执行了一下的一句权限语句但是还是不OK。

权限设置语句:

chmod g-wx,o-wx ~/.python-eggs

语句执行之后的错误:

wyl@wyl:~/myobject$ python manage.py shell
Python 2.7.8 (default, Oct 20 2014, 15:05:19) 
Type "copyright", "credits" or "license" for more information.

IPython 2.3.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPythons features.
%quickref -> Quick reference.
help      -> Pythons own help system.
object?   -> Details about object, use object?? for extra details.

In [1]: 

错误确实是不一样了。但是出现以上错误是什么原因呢?

其实到这一步已经没有错误了,这个只是不是python的操作界面而已,这是ipython的操作界面,而且这个比python的操作更人性化,这个还带tab命令补全的功能,是不是很爽啊!

 

In [3]: fro
from       frozenset  

In [3]: from django.
django.conf          django.forms         django.templatetags
django.contrib       django.http          django.test
django.core          django.middleware    django.utils
django.db            django.shortcuts     django.views
django.dispatch      django.template      

In [3]: from django.d
django.db        django.dispatch  

In [3]: from django.db import conn
connection   connections  

In [3]: from django.db import connection

In [4]: cursor = connection.cursor()

In [5]: 

 

python manage.py shell之后的一些错误:

标签:

原文地址:http://www.cnblogs.com/blogofwyl/p/4412956.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!