Jump to >


Database backend for MySQL with backported fixes.

class DatabaseWrapper(*args, **kwargs)[source]

Bases: object

Database backend for MySQL.

This is a specialized version of the standard Django MySQL database backend which adds backported compatibility fixes from newer versions of Django.

Currently, this fixes an issue where contents going into a BinaryField could trigger a MySQL warning due to the binary contents being validated as Unicode. This bug was fixed in Django 1.10.5, but is present on older versions.

To use this backend, just use djblets.db.backends.mysql as the database backend instead of django.db.backends.mysql in settings.py.

__init__(*args, **kwargs)[source]

Initialize the database backend.

  • *args (tuple) – Positional arguments for the backend.
  • **kwargs (dict) – Keyword arguments for the backend.