[Django]-AttributeError: 'DatabaseWrapper' object has no attribute 'set_schema_to_public' (tenat_schemas)

3👍

It’s very difficult to answer this without more information, but the cause of your problem is probably that you’re trying to use sqlite on Heroku. This error is thrown when you are trying to use the sqlite backend with the pgsql wrapper (or mysql). You should go through the configuration guide for Django apps on Heroku if you haven’t already. If you post relevant sections from settings.py (with secrets removed, please!) and your Procfile it will be easier to give more help towards a solution.

5👍

My issue was that I had used django.db.backends.postgresql_psycopg2 instead of django_tenants.postgresql_backend for my database engine as instructed on the docs.

Leave a comment