M
M
Marat Bashirov2019-02-09 17:02:57
Django
Marat Bashirov, 2019-02-09 17:02:57

Is it possible to build such a project structure?

There are several projects. One of them is the main one - it has a user model. All other projects have exactly the same user model. And the database is also the same, so the users are the same. How to make sure that in each project you do not have to prescribe the user model (it is custom)?
It won’t work through the site, because it needs to be all under one project, right? Of course, you can shove all the applications from these projects into one project, but it will be just pipets :) In addition, I would like to keep this business on different servers.
I would be grateful if you tell me how to do this

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Shatalov, 2019-02-10
@yashiky

If the models for users are the same in all projects, then you use this one application everywhere.
You connect the user base to other projects as an additional one in the settings - https://docs.djangoproject.com/en/2.1/topics/db/mu...
And you do routes on them for this database - https://strongarm.io/blog/multiple-databases-in-django/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question