3 ms·
Are you able to login as different database users? I would love to try using this with Schemaverse (http://schemaverse.com http://schemaverse.com) but most fra
by abstrct 13y ago
Are you able to login as different database users?
I would love to try using this with Schemaverse (http://schemaverse.com http://schemaverse.com) but most frameworks I have seen have trouble with multiple database roles/connections.
- numlocked 13y agoYep - you sure can. I haven't released it to PyPi yet, but it's committed to master and tested. You just have to override this setting: EXPLORER_CONNECTION_NAME And give it the name of the django connection you want to use. We are in the process of moving from Heroku Postgresql (which only supports a single DB user) to Amazon RDS Postgres specifically for this capability. It will ensure that users of SQL Explorer have read-only access (something that is currently enforced by a SQL blacklist - a risky approach)
- abstrct 13y agoNeat, thanks for the info! I will have to give this a try then. Luckily, I don't need to care about read-only or blacklisted queries, the entire application is already built into the database layer.
- numlocked 13y agoGotcha - in that case you'll want to turn off the blacklisting feature which you can do by overriding a setting. It's all documented in the readme :) Unfortunately there is NOT currently a way via configuration to allow the general public to access queries - it's locked down the Django admins by default. But it's just a matter of removing some view decorators to change that. Maybe something for me to add in a future version... Anyway, let me know if you need any help.