Introduction

In this article, we’ll learn how to install Django and quickly build a simple web application.

Django provides everything you need to create a flexible, fast, and easily maintainable web application. The Django framework abstracts away many of the details you would have to code in Python without the Django framework installed. Or you could use Flask, which is similar to Django and lighter weight, but isn’t as feature-rich as the Django library.

 

Prerequisites

Before you begin learning how to use the Django framework, you’ll want to first understand the basics of Python use. Fortunately, there are a gazillion resources on the web for this, including articles and free video tutorials. Here’s an invaluable resource: https://www.python.org.

There is more than one IDE out there a programmer can use to write and test Python applications, including the two most popular, PyCharm and VS Code. Having used both, this programmer prefers VS Code. Bonus: It’s free. Get it here: https://code.visualstudio.com 

Depending how new you are to Python and Django, you can try looking at the following overview or skip down to where we build a simple application. First, be sure not to skip installing the Django library for your Python code to include (import).

Overview of Django

Read the overview to see whether Django is right for what you want to build: https://www.djangoproject.com/start/overview.

Thanks to the Django Software Foundation!

 

Begin by installing Django

Before you can use Django, you’ll need to install it. Our complete installation guide covers all the possibilities; this guide will get you to a simple, minimal installation that’ll work while you walk through the introduction.

pip install Django

Note: You may need to run your command prompt as administrator.

 

Now to build a Django app

Here’s a tutorial we created using Django/Python with some HTML thrown in, to learn to build your first Django app, in this case a message board / forum system:
https://oceanmedia.net/use-django-for-a-forum-part-1-registration

 

Django documentation

Finally, you can make use of the extensive free resources available. The following Django documentation covers all you need to know to more than get started with using Django to build your web apps.
https://docs.djangoproject.com/en/3.0.