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 Basics What a View! Our First App

Shana HT
Shana HT
3,292 Points

settings.py is located in learning_site stub, but contains settings for the courses app I don't understand why

I don't understand learning_site stub purpose as it related to the courses stub, and why settings is for courses contained in learning_site stub

1 Answer

Jeff Wilton
Jeff Wilton
16,646 Points

The learning_site stub is the actual main Python package for the project, which is why it puts settings.py there by default. As you add Apps to your project, they will need to be wired up via the settings file. However, you an move the settings file anywhere you want as long as you set the DJANGO_SETTINGS_MODULE system variable on your appserver, as explained here: http://stackoverflow.com/questions/23779714/django-changing-the-default-location-of-settings-py-or-use-another-file

But for the purposes of getting started with Django, just be aware that the inner project directory is the main place where the project is configured. Hope this helps!