Ticket #12834: multi.diff

File multi.diff, 1.5 KB (added by adamv, 5 years ago)
  • docs/topics/db/multi-db.txt

    diff --git a/docs/topics/db/multi-db.txt b/docs/topics/db/multi-db.txt
    index 2b2084a..5dc7655 100644
    a b Database routers 
    106106
    107107A database Router is a class that provides up to four methods:
    108108
    109 .. method:: db_for_read(model, **hints)
     109.. method:: db_for_read(self, model, **hints)
    110110
    111111    Suggest the database that should be used for read operations for
    112112    objects of type ``model``.
    A database Router is a class that provides up to four methods: 
    118118
    119119    Returns None if there is no suggestion.
    120120
    121 .. method:: db_for_write(model, **hints)
     121.. method:: db_for_write(self, model, **hints)
    122122
    123123    Suggest the database that should be used for writes of objects of
    124124    type Model.
    A database Router is a class that provides up to four methods: 
    130130
    131131    Returns None if there is no suggestion.
    132132
    133 .. method:: allow_relation(obj1, obj2, **hints)
     133.. method:: allow_relation(self, obj1, obj2, **hints)
    134134
    135135    Return True if a relation between obj1 and obj2 should be
    136136    allowed, False if the relation should be prevented, or None if
    A database Router is a class that provides up to four methods: 
    138138    used by foreign key and many to many operations to determine if a
    139139    relation should be allowed between two objects.
    140140
    141 .. method:: allow_syncdb(db, model)
     141.. method:: allow_syncdb(self, db, model)
    142142
    143143    Determine if the ``model`` should be synchronized onto the
    144144    database with alias ``db``. Return True if the model should be
Back to Top