Creating your own activity logging in GAE/P

前端 未结 2 1864
余生分开走
余生分开走 2020-12-20 23:49

I\'d like to log user activity in my app for presentation to users and also for administrative purposes. My customers are companies so there are three levels at which I may

2条回答
  •  再見小時候
    2020-12-21 00:18

    I would also suggest the first approach but with KeyProperty:

    class Activity(ndb.Model):
        activity = ndb.StringProperty()
        user_id = ndb.KeyProperty(kind='User')
        company_id = ndb.KeyProperty(kind='Company')
    

    Code would be much cleaner from the start and you can always fine-tune later.

    For the rest Dan has covered most important points really well.

提交回复
热议问题