djangorestframework = "==3.9.2"
#settings.py
DATABASE_ROUTERS = ['website.dbRouter.DefaultRouter']
#dbRouter.py
class DefaultRouter(object):
    def db_for_read(self, model, **hints):
        return 'backup'

    def db_for_write(self, model, **hints):
        return 'default'
#models.py
xx = models.ManyToManyField(xx, null=True, verbose_name='xx')

The database is read and written separated, and add many-to-many errors 
occur.
Ask for help

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to