Added TENANT_MODEL check to __init__

This commit is contained in:
Bernardo Pires 2014-12-27 16:42:45 +01:00
parent 1b2627d70f
commit ec37a5fb6b
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,9 @@ if not settings.TENANT_APPS:
raise ImproperlyConfigured("TENANT_APPS is empty. "
"Maybe you don't need this app?")
if not hasattr(settings, 'TENANT_MODEL'):
raise ImproperlyConfigured('TENANT_MODEL setting not set')
if settings.INSTALLED_APPS[-1] != 'tenant_schemas':
warnings.warn(recommended_config, SyntaxWarning)