Source code for boardinghouse.backends.postgres.base

from __future__ import unicode_literals

from django.db.backends.postgresql_psycopg2 import base

from .schema import DatabaseSchemaEditor
from .creation import DatabaseCreation


[docs]class DatabaseWrapper(base.DatabaseWrapper): """ This is a simple subclass of the Postrges DatabaseWrapper, but using our new :class:`DatabaseSchemaEditor` class. """ def __init__(self, *args, **kwargs): super(DatabaseWrapper, self).__init__(*args, **kwargs) self.creation = DatabaseCreation(self)
[docs] def schema_editor(self, *args, **kwargs): return DatabaseSchemaEditor(self, *args, **kwargs)