Join Caleb Smith for an in-depth discussion in this video What is Django?, part of Learning Python and Django (2015).
- What is Django? Looking at the official djangoproject.com website, it describes Django as a high-level Python Web framework that encourages rapid development and clean, pragmatic design. This raises the question, what is a web framework? A web framework is a collection of tools used to build websites or web apps. The tools that Django comes with are object-relational mapping, called an ORM, which helps make database queries. Django also comes with URL routing, which helps determine what logic to follow depending on the URL of a web request.
HTML templating allows us to have presentation logic and to insert data into our HTML. Some other tools that come with Django are form handling, unit testing tools, as well as many others. Django is not a programming language. Sometimes people hear about Django and think that it is, but Python is the programming language used when working with Django. Django is also not a web server. It comes with a built-in one as a convenience for development, but when used outside of development as a real website, Django works with web servers such as Apache or Nginx.
- 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.