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 Django Templates Static Assets

Thananjaya Chakravarthy
Thananjaya Chakravarthy
4,672 Points

How to remember those big import statements.?

Can i have whats stands for what..like what is meant by 'contrib' and so,.. why do we need to use such import statements..

1 Answer

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

Generally you dont memorize bigger imports. Usually you find the ones you need while looking through the documentation for something like Django. Django is a package that consists of many different modules. Contrib is one of those modules.

If you look at the GitHub Repo for Django - Contrib you can see all the modules that live under contrib within the Django Package.

You use imports like this so you dont have to "re-invent the wheel". Basically so you can re-use code that has already been written and tested. This is why they call Python a "batteries included" language because the community writes and submits their own packages for people like you to reuse. :)