<s> class DjangoDBRouter ( object ) : <EOL> """<STR_LIT>""" <EOL> def db_for_read ( self , model , ** hints ) : <EOL> from django . conf import settings <EOL> db_name = getattr ( settings , '<STR_LIT>' , '<STR_LIT>' ) <EOL> db = None <EOL> if model . _meta . app_label == '<STR_LIT>' : <EOL> db = db_name <EOL> return db <EOL> def db_for_write ( self , model , ** hints ) : <EOL> from django . conf import settings <EOL> db_name = getattr ( settings , '<STR_LIT>' , '<STR_LIT>' ) <EOL> db = None <EOL> if model . _meta . app_label == '<STR_LIT>' : <EOL> db = db_name <EOL> return db <EOL> def allow_relation ( self , obj1 , obj2 , ** hints ) : <EOL> allow = None <EOL> if obj1 . _meta . app_label == '<STR_LIT>' and obj2 . _meta . app_label == '<STR_LIT>' : <EOL> allow = True <EOL> return allow <EOL> def allow_syncdb ( self , db , model ) : <EOL> from django . conf import settings <EOL> db_name = getattr ( settings , '<STR_LIT>' , '<STR_LIT>' ) <EOL> allow = None <EOL> if db == db_name : <EOL> allow = model . _meta . app_label in [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> elif model . _meta . app_label == '<STR_LIT>' : <EOL> allow = False <EOL> return allow </s>
