隔很長時間é‡æ–°æŽ¥è§¸æŸå€‹æŠ€è¡“çš„å¥½è™•æ˜¯ï¼Œä½ æœƒå¾ˆé–‹å¿ƒçš„ç™¼ç¾å¾ˆå¤šæ“¾äººçš„å•é¡Œå·²ç¶“被好心人們解決掉了。至少以 Python 而言,這是常見的快樂çµå±€ã€‚
弊å°ç«™è’å»¢æ—¥ä¹…ï¼Œä½†å› ç‚ºæŸç¨®å› ç´ æ¬äº†æ–°å®¶ã€‚新家燈光好氣氛佳,唯一的å•é¡Œæ˜¯äº‹éš”數年,我早就忘記 Django 該怎麼佈署了。在那é™é 的幾年å‰ï¼Œå¤§å®¶é‚„在為了 WSGI åµä¾†åµåŽ»ï¼Œä½ˆç½² Django çš„ best practice 當然是 FastCGI (舊)。為了讓弊å°ç«™å¾©æ´»ï¼Œæˆ‘很榮幸地和大家宣佈,我åˆå¸æœƒäº†æ–°æŠŠæˆ²ã€‚弊å°ç«™ç¾ä»¥ WSGI é‡æ–°é–‹å¼µã€‚
» continue reading
Posted by yungyuc
at
21:43,
0 comment,
0 trackback.
Django framework 1.0 released!
雖然我一路 SVN 跑上來,åˆæ²’花時間追 mailing list,所以沒什麼真實感,ä¸éŽåœ¨æ¤ä¸€è³€ï¼ç›¸é—œå ±å°Žè«‹åƒé–±å‰å¤§æå§†çš„æ–‡ç« ã€‚
Posted by yungyuc
at
06:03,
0 comment,
0 trackback.
據說裡é¢æ˜¯ Django,ä¸éŽè¨»å†Šæœ‰äººæ•¸é™åˆ¶ï¼Œç¾åœ¨åªå¥½å…ˆ K API éŽéŽç™®...
狂放 adsense :p
é ‚ä¸Šæ”¾ä¸€å€‹ï¼Œå³é‚Šæ”¾ä¸€å€‹ï¼Œä¸‹é¢å†æ”¾ä¸€å€‹ (喔喔,這是原來就有的)。
以上是今天改本站程å¼çš„æˆæžœã€‚把å³é‚Šçš„ sidebox 統統作æˆäº†å…ƒä»¶ï¼Œä»¥å¾Œå°±å¯ä»¥å¾žç®¡ç†ä»‹é¢è£¡ç›´æŽ¥é–‹é—œèª¿æ•´äº†ã€‚é †æ‰‹å°±ä¾†åŠ äº›é‚ªæƒ¡çš„è³‡è¨Šä¸ŠåŽ»ã€‚æŠŠ adsense çš„æ±è¥¿å…¨å¡—黑,倒還ä¸é›£çœ‹å§ã€‚
newforms 是今年 check-in Django subversion repository 的程å¼åº«ã€‚看åå—就知é“,它將會å–代舊有的 forms 程å¼åº«ã€‚
如今,Django å…§æœ‰å…©çµ„è™•ç† HTML 表單的程å¼åº«ï¼Œä¸€ç‚º newformsã€äºŒç‚º oldforms。何者為佳?必為 newforms 也。本文簡單æ述一下 newforms 程å¼åº«çš„ä½¿ç”¨æ¦‚å¿µã€‚ä½ ä¸å¯èƒ½çœ‹å®Œå°±æœƒå¯« newforms 程å¼ï¼Œä½†æœƒç™¼ç¾å®ƒçœŸçš„很簡單ï¼
» continue reading
Posted by yungyuc
at
11:33,
0 comment,
0 trackback.
Steno 就是 yobot。今天我把 Feedjack 掛進 Steno,讓 Steno å¯ä»¥å¾ž Feedjack 的資料庫裡挖 feed 出來,貼到 IRC é »é“上去。
然後,用 twisted.internet.task.LoopingCall 來定時檢查 Feedjack 資料庫。完æˆæ”¶å·¥ï¼Œè¬è¬è§€è³žã€‚
最近å„ä½æœ‰ç©ºçš„話,請儘é‡ç‹‚æ“ yobot。丟 URL 給她抓ã€å’Œå¥¹èŠå¤©ï¼Œæˆ–是拼命寫 Blog 給她 report to channel (Planet@Python.tw 諸å›ï¼ŒåŠ æ²¹ï¼)
Posted by yungyuc
at
23:25,
0 comment,
0 trackback.
把本站的 fastcgi driving script 改æˆï¼š
#!/your/path/to/python
import sys, os
from datetime import datetime
import traceback
try:
sys.path.insert(0,'/your/path/to/python/package')
os.environ['DJANGO_SETTINGS_MODULE'] = 'yoursite.settings'
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="prefork", daemonize="false",
maxrequests=100,
maxspare=2, minspare=1, maxchildren=5)
except Exception, e:
logpath = "/your/path/to/traceback.log"
if os.path.isfile(logpath):
f = open(logpath, 'a')
else:
f = open(logpath, 'w')
f.write("logged at %s :\n"%datetime.now())
traceback.print_exc(file=f)
f.write("log end.\n\n")
f.close()
# vim: set ft=python ai et nu sw=4 ts=4 tw=79:
看看會ä¸æœƒä¹Ÿæœ‰å¹«åŠ©ã€‚如果 maxrequests=100 有用的話,crontab å°±å¯ä»¥ä¸ŸæŽ‰äº†ã€‚
Posted by yungyuc
at
17:53,
0 comment,
0 trackback.
*/20 * * * * killall bad.fcgi
10 éš»å°å©é‚„嫌少?åªçµ¦ä½ 二å分é˜å¥½æ´»ï¼
近來訪客å¯èƒ½ç¶“常看到本站的 500 錯誤畫é¢ï¼Œé€™éƒ½æ˜¯æˆ‘寫的程å¼ä¸ä¹–ã€‚æœ¬äººå·²ç¶“ç¸®çŸ application server 的生命,如果還看到 500,還請å‘æœ¬äººèˆ‰å ±ã€‚è¬è¬å¤§å®¶ã€‚
Posted by yungyuc
at
14:39,
0 comment,
0 trackback.
本站舉家é·ç§»åˆ° site5。為了ä¸è¦å› 為åƒå¤ªå¤šè³‡æºè¢«è¶•å‡ºå®¶é–€ï¼Œå¾—好好改進程å¼äº†ã€‚
Posted by yungyuc
at
17:18,
0 comment,
0 trackback.
我想ä¸å‡ºé¡Œç›®ï¼Œç”¨é—œéµå—當題目好了
組態 FastCGI 是好幾年å‰çš„事了。å‰ä¸€é™£å為了測試æŸå€‹ hosting çš„ fastcgi 功能,å†èŠ±äº†ä¸€ç•ªåŠŸå¤«ç ”究 apache å’Œ fastcgi çš„é…åˆï¼Œç®—是åˆè¤‡ç¿’了回來。ä¸éŽï¼Œä»Šå¤©è¦å†ä½œä¸€æ¬¡é·ç§»å·¥ä½œæ™‚,程åºé‚„是忘記了 @_@
我決定把æ¥é©Ÿå¯«ä¸‹ä¾†ï¼Œä¹‹å¾Œé‚„è¦ç”¨çš„呢。
» continue reading
Posted by yungyuc
at
21:32,
0 comment,
0 trackback.