zoukankan      html  css  js  c++  java
  • python manage.py shell之后的一些错误:

    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 IPython's features.
    %quickref -> Quick reference.
    help      -> Python's 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 IPython's features.
    %quickref -> Quick reference.
    help      -> Python's 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]: 
  • 相关阅读:
    【转】js竖状伸缩导航
    大学易站暂时关闭通知
    【转】神同步!这俩熊孩子太会玩了,以前的同步都弱爆了
    【技术贴】搜狗浏览器 标签页 看后吧 解决
    四级查分步骤解决无法找到对应的分数 请确认你已安装并启动了CET查分保护盾
    解决Mysql远程连接出错不允许访问 ERROR 1130:Host is not allow
    xml 获取节点下的 属性。
    Oracle 获取日期区间数据
    js 数值转换为3位逗号分隔
    xml获取子节点
  • 原文地址:https://www.cnblogs.com/blogofwyl/p/4412956.html
Copyright © 2011-2022 走看看