Commits

George Notaras  committed a6699a7

Updated example project to use dedicated database.

  • Participants
  • Parent commits 16c9ba8

Comments (0)

Files changed (1)

File example/settings.py

 MANAGERS = ADMINS
 
 DATABASES = {
-    'default': {
+    'default': {    # Used by all apps of the Django project except django-powerdns-manager
         'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
-        'NAME': 'powerdns.db',                      # Or path to database file if using sqlite3.
+        'NAME': 'main.db',               # Or path to database file if using sqlite3.
+        'USER': '',                      # Not used with sqlite3.
+        'PASSWORD': '',                  # Not used with sqlite3.
+        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
+        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
+    },
+    'powerdns': {    # Used by django-powerdns-manager and PowerDNS server
+        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+        'NAME': 'powerdns.db',           # Or path to database file if using sqlite3.
         'USER': '',                      # Not used with sqlite3.
         'PASSWORD': '',                  # Not used with sqlite3.
         'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
     }
 }
 
+DATABASE_ROUTERS = ['powerdns_manager.routers.PowerdnsManagerDbRouter']
+
 # Local time zone for this installation. Choices can be found here:
 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
 # although not all choices may be available on all operating systems.