Commit 047d2f47 authored by lixiaofang's avatar lixiaofang

update DBRouter

parent c8b3d10c
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
class DemoRouter: class DBRouter:
""" """
A router to control all database operations on models in the A router to control all database operations on models in the
user application. user application.
......
...@@ -123,8 +123,7 @@ REDIS_URL = "redis://127.0.0.1:6379" ...@@ -123,8 +123,7 @@ REDIS_URL = "redis://127.0.0.1:6379"
# Database # Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases # https://docs.djangoproject.com/en/1.10/ref/settings/#databases
DATABASE_ROUTERS = ['./DBRouter'] DATABASE_ROUTERS = ['physical.DBRouter.DBRouter']
DATABASE_APPS_MAPPING = {'face': 'face'}
DATABASES = { DATABASES = {
'default': { 'default': {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment