I want to run 2 django apps on different ports in single project. It is possible? If so, how do I do it?
Asked
Active
Viewed 798 times
0
-
No, you will need to create two separate projects. However, the projects can still share a database if you want them to. – mousetail Apr 03 '20 at 08:01
1 Answers
0
Yes it's possible, if they are going to be two large apps, then it will be difficult to keep track of them and I would strongly recommend against it.
You need to modify your settings to be changed depending on the app you are running, for example you could pass in an environment variable to determine which app settings to use for which port.

Dean Elliott
- 1,245
- 1
- 8
- 12
-
Thanks for the answer. Can you give me an example? A search on the Internet did not lead to anything useful. – Fyzzy good Apr 03 '20 at 08:07
-
Have a look here: https://stackoverflow.com/questions/23325371/django-serving-each-app-separately-in-each-its-port – Dean Elliott Apr 03 '20 at 08:17