Python factory.CREATE_STRATEGY Examples
The following are 1
code examples of factory.CREATE_STRATEGY().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
factory
, or try the search function
.
Example #1
Source File: base_factory.py From gae-angular-material-starter with MIT License | 5 votes |
def _create(cls, model_class, *args, **kwargs): """Since we use factory.CREATE_STRATEGY this function will be called at the moment of creating instance of this class. Note put_async here, to benefit from parallel puts, top level function, such as one in generate_db_api.py must use decorator @ndb.toplevel""" obj = model_class(*args, **kwargs) obj.put_async() return obj