Book Image

Django 4 for the Impatient

By : Greg Lim, Daniel Correa
Book Image

Django 4 for the Impatient

By: Greg Lim, Daniel Correa

Overview of this book

Learning Django can be a tricky and time-consuming activity. There are hundreds of tutorials, loads of documentation, and many explanations that are hard to digest. However, this book enables you to use and learn Django in just a couple of days. In this book, you’ll go on a fun, hands-on, and pragmatic journey to learn Django full stack development. You'll start building your first Django app within minutes. You'll be provided with short explanations and a practical approach that cover some of the most important Django features, such as Django Apps’ structure, URLs, views, templates, models, CSS inclusion, image storage, authentication and authorization, Django admin panel, and many more. You'll also use Django to develop a movies review app and deploy it to the internet. By the end of this book, you'll be able to build and deploy your own Django web applications.
Table of Contents (14 chapters)

Installing Django

We will be using pip to install Django. pip is the standard package manager for Python to install and manage packages not part of the standard Python library. pip is automatically installed if you downloaded Python from https://www.python.org/.

First, check whether you have pip installed by going to the Terminal and running the following.

For macOS, run this:

pip3

For Windows, run this:

pip

If you have pip installed, the output should display a list of pip commands. To install Django, run the following command:

For macOS, run this:

pip3 install Django==4.0

For Windows, run this:

pip install Django==4.0

The preceding command will retrieve the latest Django code and install it on your machine. After installation, close and reopen your Terminal.

Ensure you have installed Django by running the following commands.

For macOS, run this:

python3 -m django

For Windows, run this:

python -m django

Now, the output will show...