Can I Use A Directory To Contains A Couples App Directory?
Can I use a directory to contains a couples app directory? I mean, my project is very large, and there are many apps in my project. such as apps about admin user, apps about norma
Solution 1:
I assume that probably you are using one of the latest versions of Django.
In my case I like to create a folder called apps to keep the project more organized.
This is my project structure example:
and then I am doing this in the settings.py file:
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
PARENT_DIR = os.path.abspath(os.path.join(BASE_DIR, os.pardir))
sys.path.insert(0, os.path.join(PARENT_DIR, 'apps'))
So, I think you could do something similar creating multiple folders to organize your custom apps.
I hope it make sense.
Post a Comment for "Can I Use A Directory To Contains A Couples App Directory?"