BUG!!!======>dd-wrt上运行django,安装 imaing python library 软件的时候找不到 gcc

  • django框架中我们建立的models的模块如果有设置 ImgField字段的话,我们运行django runserver 就会提示我们缺少imging python library,根据提示找到了安装包,在安装的过程中出现例如缺少/bin/gcc的情况,这个时候如果是PC机的话安装的是python-devel,后来我在路由器(dd-wrt)上运行django 发现没有python-devel这个包,此时 我安装了buildroot,问题迎刃而解。 
  • crontab? mod_python? simpleJson? vim? html? scp ? 需要解决
  • 在玩django 的过程中,运行后发现一下错误:
    TypeError at /search/
    'str' object is not callable
    Request Method:    GET
    Request URL:    http://127.0.0.1:8000/search/?q=dfsg+dsfa+sfd
    Django Version:    1.4.1
    Exception Type:    TypeError
    Exception Value:    
    'str' object is not callable
    Exception Location:    /usr/lib/python2.7/site-packages/django/core/handlers/base.py in get_response, line 111
    Python Executable:    /usr/bin/python
    Python Version:    2.7.3

    而mysite.urls文件中是这样

     1 urlpatterns = patterns('',
     2     # Examples:
     3     # url(r'^$', 'mysite.views.home', name='home'),
     4     # url(r'^mysite/', include('mysite.foo.urls')),
     5 
     6     # Uncomment the admin/doc line below to enable admin documentation:
     7     # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
     8 
     9     # Uncomment the next line to enable the admin:
    10         url(r'^polls/',include('polls.urls')),
    11         url(r'^books/',include('books.urls')),
    12         url(r'^admin/', include(admin.site.urls)),
    13         url(r'^search/$', 'search'),
    14 )

    最后我把'search'的单引号去掉了,bug解决。这个是mysite下的urls文件,而我自己启动的app中的urls却引号加也可以,不加也可以,不知到是什么原因。

posted @ 2012-08-22 20:45  事件轮询,回不到过去  阅读(509)  评论(0编辑  收藏  举报