N
N
nasausa2019-11-05 16:30:42
Django
nasausa, 2019-11-05 16:30:42

How to implement multiple sites within one Django project?

How and is it possible to reproduce the following architecture within one django project (and, accordingly, within one VPS):
1. Each application is responsible for one "site". The applications are not related in any way.
2. Each application uses its own database, i.e. if there are three applications, for example, then there are also three databases.
3. Each application is assigned its own domain.
The first two points are clear in the implementation, but how to implement point 3. I will repeat within the framework of one VPS and one Django project. And how should I reconfigure nginx, supervisor, gunicorn?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-11-06
@UPSA

I don’t remember and I can’t find it .... but I’ll give you the direction)))
1. https://stackoverflow.com/questions/3369486/multip...
see the answer not marked with a green checkmark. There were articles, based on them.
2. something close to https://djbook.ru/examples/62/
I somehow did it for my self-education. Nginx launched domain1.wsgi which launched domain1_settings.py (variables for the site) in which settings.py (variables for the host (let's call it so)) was predefined
Roman Kitaev , I can't calm down when there are no answers)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question