Skip to content
Snippets Groups Projects
Commit 85f73af7 authored by Christian Pointner's avatar Christian Pointner
Browse files

migrations for database nop should only be done on nop database

parent 2ec0ff18
No related branches found
No related tags found
No related merge requests found
class NopRouter(object):
def allow_migrate(self, db, app_label, model_name=None, **hints):
if app_label == 'nop':
return db == 'nop'
return None
...@@ -6,6 +6,8 @@ from django.db import migrations, models ...@@ -6,6 +6,8 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
app_label = 'nop'
dependencies = [ dependencies = [
] ]
......
...@@ -21,6 +21,8 @@ DATABASES = { ...@@ -21,6 +21,8 @@ DATABASES = {
} }
} }
DATABASE_ROUTERS = ['nop.dbrouter.NopRouter']
TIME_ZONE = 'Europe/Vienna' TIME_ZONE = 'Europe/Vienna'
LANGUAGE_CODE = 'de' LANGUAGE_CODE = 'de'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment