Django: Where to place global models?

I am creating a fairly large site in Django, and this is my first time doing any of this scale using the framework. (I have, however, used it in the past, so I know my way and am not a newbie). I have a number of model classes that will be used throughout the application, so my question is, where is the best place to place them?

I could also use some tips on how to structure my project. I don't want to have a crazy hierarchy, and I would like to use ./manage.py startapp as economically as possible.

+4
source share
1 answer

I think the easiest way is to make the "main" application, and then import the models from this application into other peripheral applications when you need the basic models.

 manage.py startapp main 
+8
source

Source: https://habr.com/ru/post/1334889/


All Articles