Join Caleb Smith for an in-depth discussion in this video Creating a Django app, part of Learning Python and Django (2015).
- In Django, an app is a folder…with a set of Python files in it.…In this context, a Django app means more like component,…as opposed to an entire application.…A Django project is the overall program which can contain…one or more different Django apps.…Each Django app fits a particular role or purpose.…For example, for each of the following we might use…a separate app within a Django project,…such as a blog, forum app, and a wiki.…
Each of these are a separate set of features…that perform a separate role for the overall project,…so they belong in separate Django apps.…An app typically has several pieces…each of which is optional.…So, these pieces are the models.py, admin.py, views.py,…test.py files, and the migrations folder.…Each of these fulfills a specific role within the app.…The models file defines this data layer of the application,…such as the structure of the database tables…and how they are queried.…
The admin file defines the administrative interface…for viewing and updating data for that application.…
- Creating a new Django project
- Defining Django models and fields
- Querying data with the Django ORM
- Building views and templates
Skill Level Intermediate
Q: pip says it was installed correctly, and I've updated the PATH variable as shown, but the pip --version command isn't working. Why?
A: Depending on your computer's setup, you'll need to restart your terminal/command prompt before the additions you've made to the PATH variable are respected. With some setups, even that won't be enough, and you may need to restart the entire machine before you are able to use the pip command directly.