Articles about Django

Django Session-based Auth for Single Page Apps

In this article, we'll look at how to authenticate Single-Page Applications (SPAs) with session-based authentication. We'll be using Django for our backend while the frontend will be built with React, a JavaScript library designed for building user interfaces.

Securing a Containerized Django Application with Let's Encrypt

How do I set up an SSL Certificate for a Django application? In this tutorial, we'll look at how to secure a containerized Django app running behind an HTTPS Nginx proxy with Let's Encrypt SSL certificates. This tutorial builds on Dockerizing Django with Postgres, Gunicorn, and Nginx. It assumes you understand how to containerize a Django app along with Postgres, Nginx, and Gunicorn.

Deploying Django to AWS with Docker and Let's Encrypt

In this tutorial, we'll deploy a Django app to AWS EC2 with Docker. The app will run behind an HTTPS Nginx proxy that uses Let's Encrypt SSL certificates. We'll use AWS RDS to serve our Postgres database along with AWS ECR to store and manage our Docker images.

Customizing the Django Admin

Django's automatically generated admin site is one of the biggest strengths of the framework. The centralized admin interface lets you easily view and manipulate your models' data. This can save you a lot of time while developing and managing content.

Storing Django Static and Media Files on Amazon S3

Amazon's Simple Storage System (S3) provides a simple, cost-effective way to store static files. This tutorial shows how to configure Django to load and serve up static and user uploaded media files, public and private, via an Amazon S3 bucket.

How to Use a Foreign Key to Create Many-to-One Relationships in Django

In Django, there are three main types of relationships: one-to-one, many-to-one, and many-to-many. In this article, I will explain the many-to-one relationship in Django. If you are a beginner with some knowledge about Django project setup or even have some decent experience in Django, you can follow along with this article.

How to Measure Django Code Quality Using SonarQube, Pytest, and Coverage

We're going to dive deep into the realm of Django code quality assessment. In this comprehensive guide, I'll walk you through an in-depth approach to measuring the code quality of your Django-based application.

Web Security in Django – How to Build a Secure Web Application

Web security is an important aspect of the web application development process. Especially as more data is stored, managed, and shared. As a web developer, it's essential to prioritize security measures to protect your company’s users and data from potential threats.

Getting Started with Django Channels

In this tutorial, we will use Django Channels to create a real-time application that updates a list of users as they log in and out.

Python Chat Tutorial with Django and React

This tutorial will explain how to build a chat application with Python, Django and React.

Celery Integration With Django

In this article, we will explore the benefits and limitations of using Celery to build robust and efficient applications. We will examine the use cases for Celery, including its ability to improve the performance of web applications through asynchronous task execution.

Preparing Your Django Application for Production

Getting started with Django is quick and easy. By default Django comes configured for a local development environment, and while you can create elaborate web applications that work on your local machine, at some point you’ll want to get your web application production-ready.

Django REST Framework: Get Started Fast

If you’re not interested in the nuts and bolts of the Django REST Framework (DRF), just jump to the tutorial bit to know how to get your API off the ground in five minutes or less. Afterwards, come back and check out the details of how each part of the DRF tutorial is put together and what additional features and functionality you can get from DRF.

Django Forms: Working with Forms in Python

Dealing with HTML forms in a web application can be a complicated task: ideally, you’d have a standard way of rendering input fields and processing the inputted data. Django forms provide you with a framework that does just that. Django comes with some standard ways of rendering forms with inputs of various types.

Using Django Static Files and Templates: Django Tutorial Part 2

Django is made up of a few core components that we touched on in the last Django tutorial: Django Models make up the structure and behavior of data in a Django project, Django Views process incoming requests and provide responses, and Django Templates are populated with data and then rendered to the browser from the view response.

Finally, Real-Time Django Is Here: Get Started with Django Channels

When Django was created, over ten years ago, the web was a less complicated place. The majority of web pages were static. Database-backed, Model/View/Controller-style web apps were the new spiffy thing. Ajax was barely starting to be used, and only in narrow contexts.

Flask vs. Django: Choose Your Python Web Framework

По данным исследования 2018 Python Developers Survey, Flask и Django, безусловно, являются самыми популярными веб-фреймворками для разработчиков на Python. Вы вряд ли ошибетесь с выбором любого из этих фреймворков, если решаете, какой из них использовать для нового веб-приложения.

What is Django? A Quick Django Tutorial Part 1

Written in Python, Django is the self-proclaimed web framework for perfectionists with deadlines – and I have to agree. Django provides so much power out of the box and is built on Python – which has its own repository of libraries, PyPI – that you can lean on. It’s easy to understand why Django is the top Python web framework today and is among the top six of all programming frameworks.

Learn the Django User Authentication System

Giving users the ability to create an account they can sign into is a common function for many websites. Users might need an account to participate in a comment thread, save their personal information, or transfer money. Whatever the use case may be, you need to build an authentication system that’s simple and safe for your users.

Django Database Migrations: A Comprehensive Overview

The Django web framework is designed to work with an SQL-based relational database backend, most commonly PostgreSQL or MySQL. If you’ve never worked directly with a relational database before, managing how your data is stored/accessed and keeping it consistent with your application code is an important skill to master.