From a user experience and security point of view you should consider the following points as well:
(A) Is this supposed to be an app like PHPAdmin where we talk about one user connecting to their own database?
(B) Is this a closed application where all users work on the same tables as a team and if the data is being corrupted this will affect all the users in the same way? You really must have confidence in the team that they do not want to bully each other by fishing around in Django's authentication tables.
(C) Or is this an application open for registration to the public where each user works on their own tables and should not have even the tiniest possibility to bring down the system by affecting tables vital to django (like auth_*
).
If this is more about (C) than (A) then don't do this. If it's rather (B) than (A), even then - rather don't. If this is a paid project and you have to guarantee that the database won't get sniffed or corrupted and you don't want to write your own SQL parser and do sufficient security tests - you should think well about this type of feature.
Alternatively:
With Django as a tool, and depending on your business needs, it might be a valid option to create a complex form from which the user can select Django models (:= sql tables) and filters (:= joins/where clauses) to create their own reports.
If this is about a reporting tool - you might want to check out existing reporting modules for Django and the possibilities offered by the Django Admin.