实现了个新鲜事功能 开放测试
Friday, Jan.. 2. 2009 –
Category: GAE 开发 –
4 Comments
Tags:
Google App Engine
实现了新鲜事功能 ,基于Django的signals
目前新加文章以及评论 都会记录为新鲜事 以后可以很方便的扩展到其他的Model类上 只要继承我得SignalsBaseModel类就好了. 先开放公测:-) 测试地址
http://ihere.appspot.com/labs/
http://ihere.appspot.com/event/
class SignalsBaseModel(BaseModel):
def save(self,created=False):
signals.pre_save.send(sender=self.__class__, instance=self)
super(SignalsBaseModel,self).save()
try:
if not self.lastModifiedDate:
created=True
except AttributeError:
created=False
# created=self.is_saved()
signals.post_save.send(sender=self.__class__, instance=self,created=created)
def delete(self):
signals.pre_delete.send(sender=self.__class__, instance=self)
super(SignalsBaseModel,self).delete()
signals.post_delete.send(sender=self.__class__, instance=self)
具体实现参照http://ihere.appspot.com/post/2323
4 Response to “实现了个新鲜事功能 开放测试”
Leave a Reply
Logo
About Me
-
A Computer Geek in Beijing, China. Focus on Web2.0 Technology: Google App Engine, Python, Django, Software Architecture, Agile, JAVA, J2EE, JavaScript, etc.
Coding for fun, Coding with passion :-) It's my life!
Most Popular Posts
- 1. GAE限制续 (2118)
- 2. Eclipse Google Plugin安装指南 (1988)
- 3. iHere Blog 1.0.2 安装配置 (1837)
- 4. iHere Blog 安装 简要配置 (1526)
- 5. 终于在做导入的时候遇到了GAE的瓶颈 (1216)
- 6. 新加Ajax效果Page flow (1108)
- 7. GAE上面的Unittest总结 (1104)
- 8. Web Python IDE Py I/O release! (1085)
- 9. 新东西 呵呵 JS3D (1051)
- 10. 转向了Appengine patch (1034)
Tags
-
App Engine
Appengine patch
Django
Google
Google App Engine
Google App Engine
Java
algorithm
api
app
appengine
autodiscovery
blog
cache
chat
cloud computing
cron jobs
datastore
demo
feature
fetion
fridge
gae
geo
google
google app engine
google docs
googlemaps
iHere Blog History
ide
ihere
inforsphere
install
java
jquery
map
mashup
memcache
metaweblog
new
nutch
open source
pageflow
plugin
projects
pyio
python
quota
release
released
rss
sdk
snap
sort
topStory
twitter
weblog api
杂记


11 months, 1 week ago IP:...
Cool! 测试一下!
11 months, 1 week ago IP:...
呵呵 回踩你的blog了~ 是呀signals对于减少app间的耦合 app间的通讯都有深远的意义~pinax是个好东西 , 其实主要是看看他项目的组织, 以及别人写Django App的方式... 看它的代码学到很多..
11 months, 1 week ago IP:...
测试~
11 months ago IP:...
不错