Django Knowledge Base

Django framework and libraries documentation

Django Framework Documentation

Django is a free framework for Python-based web applications that uses the MVC design pattern.

Python documentation

Python is an easy to learn, powerful programming language.

Django ORM Cookbook

Django ORM Recipes is a book about working with Django ORM and Django models. Django ORM is one of the key pillars of Django.

Django Rest Framework

Django Rest Framework (DRF) is a library that works with standard Django models to create a flexible and powerful API for a project.

SQLAlchemy

SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.

Django CMS

Django CMS is a modern web publishing platform built on Django, a web application framework "for perfectionists with deadlines".

Channels - extension for asynchronous work with Django

Channels is a project that takes Django and extends it beyond HTTP to handle WebSockets, chat protocols, IoT protocols, and more.

asgiref - ASGI specification and utilities

ASGI (Asynchronous Server Gateway Interface) is the spiritual successor to WSGI, designed to provide a standard interface between asynchronous web servers, platforms, and Python applications.

Python Social Auth Documentation

Python Social Auth is an easy-to-configure social authentication/registration mechanism with support for multiple platforms and authentication providers.

Django Crispy Forms - best form builder

The best way to get Django DRY forms. Create reusable programmatic layouts from components with full control over the rendered HTML without writing HTML in templates. All this without breaking the standard Django way of working, so it works great with any other forms application.

Articles, news, and tips on Django and Python

How to Use Pandas GroupBy, Counts and Value Counts

If you’re a data scientist, you likely spend a lot of time cleaning and manipulating data for use in your applications. One of the core libraries for preparing data is the Pandas library for Python.

Data Science, the Good, the Bad, and the… Future

How often do you think you’re touched by data science in some form or another? Finding your way to this article likely involved a whole bunch of data science (whooaa). To simplify things a bit, I’ll explain what data science means to me. “Data Science is the art of applying scientific methods of analysis to any kind of data so that we can unlock important information.”

Time Series Analysis with Pandas

Python’s pandas library is frequently used to import, manage, and analyze datasets in a variety of formats. In this article, we’ll use it to analyze Amazon’s stock prices and perform some basic time series operations.

Statistical Modeling with Python: How-to & Top Libraries

One of the most important factors driving Python’s popularity as a statistical modeling language is its widespread use as the language of choice in data science and machine learning.

Handling Imbalanced Datasets with SMOTE in Python

Close your eyes. Now imagine a perfect data world. What do you see? What do you wish to see? Exactly, me too. A flawlessly balanced dataset. A collection of data whose labels form a magnificent 1:1 ratio: 50% of this, 50% of that; not a bit to the left, nor a bit to the right. Just perfectly balanced, as all things should be. Now open your eyes, and come back to the real world.

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.

Django Templates: Best Practices

Django, as a web framework, uses templates as a way of producing static HTML from the output of a Django view. In practice, Django’s templates are simply HTML files, with some special syntax and a set of tools which lets Django render the HTML page on-the-fly for the visiting user. Templates are highly customizable, but are meant to be simple, with most of the “heavy” logic going into the view. Let’s dive deeper and learn some standard ways of dealing with common problems.

Advanced Django Models: Improve Your Python Development

Models are a core concept of the Django framework. According to Django’s design philosophies for models, we should be as explicit as possible with the naming and functionality of our fields, and ensure that we’re including all relevant functionality related to our model in the model itself, rather than in the views or somewhere else.

Making a Custom Django User Model Tutorial

The Django User model is at the center of Django’s authentication system. It is the mechanism for identifying the users of your web application. A user will log in by providing their username and password. Then (depending on your authentication backend) the identity of that user is preserved across requests either through a session, a token, or some other mechanism.

Django and Python "Questions and answers"

Django Class-Based Views Reference