Moved retry mechanism to mixin

This commit is contained in:
Swen Kooij
2017-02-03 10:35:39 +02:00
parent 5db87763fb
commit bb11253207
6 changed files with 57 additions and 37 deletions

View File

@@ -34,14 +34,14 @@ def _get_backend_base():
'\'%s\' is not a valid database back-end.'
' The module does not define a DatabaseWrapper class.'
' Check the value of LOCALIZED_FIELDS_DB_BACKEND_BASE.'
))
) % base_class_name)
if isinstance(base_class, Psycopg2DatabaseWrapper):
raise ImproperlyConfigured((
'\'%s\' is not a valid database back-end.'
' It does inherit from the PostgreSQL back-end.'
' Check the value of LOCALIZED_FIELDS_DB_BACKEND_BASE.'
))
) % base_class_name)
return base_class