Create database and superusers automatically with Django

Asked

Viewed 112 times

0

I developed a system with Python and Django. Now I would like to make it available on the web so that users can create accounts on the system, for this it would be necessary that each user has their database.

Today, to create my user I use the command python manage.py createsuperuser and in the archive settings.py specify the database I want to use.

I hosted my app on a server on DigitalOcean and there I configured the system as I did locally, but now, how do I automate the creation of new users and that for each one manages its respective bank?

1 answer

0

In case your application must have an implementation to give users who are registered, superuser permission. I recommend reading the Django documentation in the user creation section. I believe that it is not necessary a database for each user, because all users will be registered and registered in a single bank, where your application will perform queries and writing. From a read on this documentation that can clarify your ideas for implementing. Django Auth

  • My system is product management, meaning every user will have their products, their customers, their sales, and so on. For all users the tables will be the same, so it is essential each user have their database

Browser other questions tagged

You are not signed in. Login or sign up in order to post.