Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Django Project package vs app

When you create a project you get a directory with the same name as your project. What is the difference between this folder and an app folder?

I understand that the contents are different, but what would stop you from treating this project folder as an app?

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,441 Points

There are many way to configure a Django project. It may help to think of the topmost level directory as the repository level and the lower project directory as the project configuration area.

It is certainly possible to put all development within the lower project directory. However, doing this blurs the separation of apps (which may be many) and the project.

Putting the apps in their own separate peer directory to the lower project directory allows for cleaner packaging of individual apps for sharing and eases adding and removes apps without affecting other apps or muddying the project specific configuration files.

This is also the customary practice amount Django developers.

Thank you for this. I couldn't find a clear answer anywhere.