Add Application to dj project - app folder outside project dir

I am going to create some solutions base on django, and I am not aware how to add my app to my django project when apps folder is not in the project’s folder …

└── xdproject
└── pycache
├── migrations
├── ssl-keys
└── tmp

also I use Apache + WSGI for app server
Any help is welcome and big thanks for support !

See the tutorial docs at Advanced tutorial: How to write reusable apps | Django documentation | Django

I did, but I dont found the my case …
maybe I miss something …

Ok, so let’s start with a more fundamental question. Why are you looking to do this? This doesn’t “fit” the general pattern for code organization, so what is the intended benefit you’re hoping to achieve?

Sure, You have asked good question,
Why I going to have separated folder for app and project is that
to avoid some mistakes and provide hard separation of settings files , have clear vision to app’s folders structure, ease exchange the apps version / modules without touching the proj folder, maybe also some security/privilege aspects …
but I am more database oriented user :slight_smile: so probably my idea is too complicated :slight_smile:

BTW thank you for your engagement, if my vision is not relevant for dj I will of course do in suggested way …

I’d more phrase it as “you’re concerning yourself about things that aren’t an issue with django” in that you’re trying to solve problems that don’t really exist - with one exception.

This is the purpose of the tutorial page that I directed you too. If you want “portable apps” that remain physically separate from your project (usually because you want to use those apps in multiple projects), then you would create a package for your app, making it an independently installable module - and that is what that section of the tutorial teaches you to do.

1 Like