原创 The view didn't return an HttpResponse object. It returned None instead. Request Method: POST

http://stackoverflow.com/questions/29322580/the-view-didnt-return-an-httpresponse-object-it-returned-none-instead-reque

原创 django中在數據中刪除了關係表後怎麼處理

1.首先查看你的models.py中是否存在這個數據庫中不存在表的類,有的話就刪除 2.參考這個http://stackoverflow.com/questions/27583744/django-table-doesnt-exist 重

原创 openstack中的消息總線

1.遠程過程調用(RPC Remote Procedure Call) 一個服務進程調用其他遠程服務進程的方法,包含Call和Cast方法 call主要是通過同步執行,調用者會被阻塞,直到結果返回 cast主要是異步執行,不會立即返回結果

原创 python的supervisor進程管理使用

1.pstree   查看下運行的進程關係樹形圖 看到一個supervisord進程就是你目前運行 2.修改supervisord.conf文件後,使用supervisorctl命令的reload命令重載配置文件,用status可以查看目

原创 Caught TypeError while rendering: coercing to Unicode: need string or buffer, NoneType found

如果有field存在blank=Ture,屬性就刪除就好

原创 openstack中的tox.ini文件

1.tox是openstack中的測試工具(另一個是run_test.sh腳本) 2.用途是檢查軟件包能否在不同的python版本中或解釋器中正常安裝 3.這個工具是在一個虛擬環境中測試的 4.使用方法 tox -e pep8 #

原创 webkit開發前的準備工作

1.源碼下載的地址:http://nightly.webkit.org/。這裏有關於webkit衆多的資料可以查詢。 2.準備開發IDE,根據文章介紹, Installing the Developer Tools OS X or i

原创 python

python中的def def語句將在執行的時候創建一個函數對象並且把函數對象賦值給變量(函數名) def語句是實時運行的,沒有編譯過程

原创 django中的模型爲什麼返回的是對象

今天遇到了一個問題,是顯示這個PerissionList對象的時候,發現返回的是這個對象本身,而不是這個對象內的屬性 根據別人的提示,我看了源碼,發現只要填加__unicode__或者__str__函數就ok了,這個內置函數的意思是把屬

原创 queryset object has no attribute meta

filter() returns a QuerySet also if only one object if found. If you want to return just a model instance, use get()

原创 python的內置函數

__str__是返回對象的字符竄表達式 from django.db import modelsclass Reporter(models.Model):full_name = models.CharField(max_length=

原创 Numpy-day01

numpy.tile(A, reps) 該函數返回一個ndarray數組 通過參數A的長度和reps的長度決定輸出什麼類型的數組 >>> from numpy import * >>> list_v = [1,2,3,4,5] >>> t

原创 django restful api

def storeInfo(request):     if request.method == 'POST':         questionText = request.POST.get('questionText','')    

原创 openstack-nova學習

1.nova是什麼? nova組件是openstack中最基礎的模塊,主要是管理虛擬機的資源和生命週期。 2.nova的工作原理? 從客戶端發送一個restful請求,通過nova-api把請求轉換成HTTP請求,這個請求被放入了一個消息