Ticket #13428: allow_relation_example.diff
File allow_relation_example.diff, 578 bytes (added by , 15 years ago) |
---|
-
docs/topics/db/multi-db.txt
256 256 def allow_relation(self, obj1, obj2, **hints): 257 257 "Allow any relation between two objects in the db pool" 258 258 db_list = ('master','slave1','slave2') 259 if obj1 in db_list and obj2in db_list:259 if obj1._state.db in db_list and obj2._state.db in db_list: 260 260 return True 261 261 return None 262 262