Ticket #13428: allow_relation_example.diff

File allow_relation_example.diff, 578 bytes (added by Cliff Dyer, 14 years ago)

Patch to fix code example in multi-db documentation.

  • docs/topics/db/multi-db.txt

     
    256256        def allow_relation(self, obj1, obj2, **hints):
    257257            "Allow any relation between two objects in the db pool"
    258258            db_list = ('master','slave1','slave2')
    259             if obj1 in db_list and obj2 in db_list:
     259            if obj1._state.db in db_list and obj2._state.db in db_list:
    260260                return True
    261261            return None
    262262
Back to Top