Home | History | Annotate | Download | only in frontend

Lines Matching refs:model

43     def _should_be_in_server_db(self, model):
44 """Return True if the model should be stored in the server db.
46 @param model: Model to decide for.
48 @return: True if querying the model requires server database.
50 return model._meta.db_table.startswith('server')
53 def _should_be_in_global(self, model):
54 """Returns True if the model should be stored in the global db.
56 @param model: Model to decide for.
58 @return: True if querying the model requires global database.
60 return model._meta.db_table.startswith('tko_')
63 def db_for_read(self, model, **hints):
66 @param model: Model to decide for.
72 if self._should_be_in_server_db(model):
74 if self._should_be_in_global(model):
79 def db_for_write(self, model, **hints):
82 @param model: Model to decide for.
88 if self._should_be_in_server_db(model):
90 if self._should_be_in_global(model):