The FileField of the Django forms can be tied up just fine to the BlobProperty of a Data Store entity. This is how you do it.
The model
Displaying the form
The albumentry.html file is rather uninteresting, just stick {{ form }} in there and remember to put the enctype="multipart/form-data" attribute on the <form> tag. The above example will work just fine, and save the image as blob data to your BlobProperty.
The code used in this blog entry requires: App Engine SDK 1.1 Django Helper r30 Django 0.97
11 kommentarer:
hi! where I can download the "web2py"? Is it for windows or only for mac?
Thanks!
web2pyTM Download
http://mdp.cti.depaul.edu/examples/default/download
Mattias, thanks a lot for the snippet.
But.. could you provide a .zip with full working project?
Hi,
Could you help me with this issue?
http://groups.google.com/group/google-appengine/browse_thread/thread/caefa0f4b85b8d39
Have you seen this?
http://web2py.appspot.com/
(reddit clone on GAE written in web2py)
Anyone know how to do this with the most recent appengine? it wont let me import that BaseModel thing, which im assuming is whats needed for the FileField class to be available.
Great refreshing blog
Did you visit happy holiday
http://www.holidayvisit.blogspot.com/ ?
It’s not a holiday visit; it’s an everyday visit blog
Hey hey,
I'm getting this error:
Blob() argument should be str instance, not InMemoryUploadedFile
(using django 0.97 latest svn)
Any ideas how I solve this?
I can't seem to make this work. Could you please verify that your code works with the latest django snapshot and/or update the code of your view with your imports? Thanks!
hi! this is not work for me with django 1.0.
thanks.
(法新社a倫敦二B十WE四日電) 「情色二零零七」情趣產品大產自二十三日起在倫敦的肯辛頓奧林匹亞展覽館舉行,倫敦人擺脫對性的保守態度踴躍參觀成人影片,許多穿皮衣與塑膠緊身衣的好色之徒擠進這項世界規模最大的成人生活展,估計三天展期可吸引八a片下載萬多好奇民眾參觀。
活A片下載動計畫負責人情色米里根承諾:「要搞浪漫、誘惑人、情色電影玩虐待,你渴望的AV女優我們都有。」
他a片說:成人電影「時髦的設計與華麗女裝,從吊飾到束腹到真人大小的色情雕塑,是我們由今年展出的數千件產品精選出的av女優一部分,參展產品還包括時尚服飾、貼身女用內在美、鞋子、珠寶、玩具、影片、藝術成人電影、圖書及遊戲,更不要說性愛輔具成人網站及馬術裝備。」
參觀民眾遊覽兩百五十多個攤位,有性感服裝、玩具及情色情色食品,色情影片迎合各種品味。
大舞台上表演的是美國野蠻搖av滾歌手瑪莉蓮曼森的前妻─全a片世界頭牌脫衣舞孃黛塔范提思,這是她今年在英國唯一一場表演。情色
以一九四零年代成人影片風格演出的黛塔范提思表演性感的天堂鳥、旋轉木馬及羽扇等舞AV蹈。
A片參展成人網站攤位有的推廣情趣用品,有情色電影的公開展示人體藝術和人體雕塑,也有情色藝術家工會成員提供建議。
Skicka en kommentar