OLD | NEW |
---|---|
(Empty) | |
1 from google.appengine.ext import ndb | |
Sharu Jiang
2016/11/04 18:39:46
So the common/ here is for things shared by fracas
stgao
2016/11/08 18:53:32
These are the models/etc that have to be shared be
| |
2 | |
3 from gae_libs.model import versioned_model | |
4 | |
5 class CrashAnalysis(versioned_model.VersionedModel): | |
6 signature = ndb.StringProperty(indexed=False) | |
7 | |
8 stacktrace = ndb.StringProperty(indexed=False) | |
9 | |
10 @classmethod | |
11 def CreateKey(cls, signature): | |
12 return ndb.Key(cls, signature) | |
13 | |
14 @classmethod | |
15 def Create(cls, signature): | |
16 return cls(key=cls.CreateKey(signature), signature=signature) | |
17 | |
18 @classmethod | |
19 def Get(cls, signature): | |
20 return cls.CreateKey(signature).get() | |
OLD | NEW |