По умолчанию в Django не предусмотрено никаких методов стилизации форм, из-за чего приходится тратить много сил и драгоценного времени, чтобы красиво оформить форму. django-crispy-forms решает эту проблему.
The goal of this article is to get you started using Django to build a web application as quickly as possible, and set you on the road to a production-ready application. For demonstration purposes, we’ll be creating a simple blog for our company called Foo.
Sending email messages from a web app often seems like throwing stones into a black hole. You create a message, pass it to a mail send function and hope for the best. You don't control an inbox and mail server, so this whole process happens somewhere in between, and you hope it just works.
In the previous article, we have learnt where to start with performance optimization in django application and find out which APIs to optimize first. In this article, we will learn how to optimize those selected APIs from the application.
It is important to understand the difference between AbstractUser and AbstractBaseUser in Django, this will help you make the right decision on which one to use when you are starting a Django project.
How do I fully replace the username field with an email field for Django authentication? This post explains step-by-step how to create a custom User model in Django so that an email address can be used as the primary user identifier instead of a username for authentication.
In a Django application, when schema changes Django automatically generates a migration file for the schema changes. We can write additional migrations to change data.
It was necessary here to find a discrepancy between the amount of the Payment payment and the amount of the PaymentItem elements associated with it. This is solved with a simple annotation.
Every new Django project must use a custom User model. The official Django documentation says it's "highly recommended", but I'll go one step further and say without hesitation: you're crazy if you haven't used a custom model before.
When optimizing the performance of a web application, a common mistake is to start by optimizing the slowest page (or API). In addition to taking into account the response time, we also have to take into account the traffic it receives in order to determine the optimization order. In this article, we'll walk through a Django web application, find performance bottlenecks, and then start optimizing them for better performance.
Django ORM makes it easy to interact with the database. To understand what's going on behind the scenes or see SQL performance, we can record all the SQL queries that are being executed. In this article, we will see different ways to achieve this.
MIddleware are used to modify an incoming request object into a view or to modify a response object returned from a view. They allow us to modify requests/responses globally.
There are two main ways to organize Django's template structure: application-level and custom, project-level, which is specified in setting.py.
Importing modules is an essential part of Python and Django development. These tips will help you write good and beautiful code.
Configuring user rights is one of the main parts when developing projects and can quickly become quite complex. Let's break down the main techniques on the example of a blog.
In this article, I would like to share my experience and help in designing and formatting your Django code. Hopefully you are already using PEP8, but it is also a good tone to use Django's code formatting style guidelines.
Want to quickly check how long a function in a project takes to complete? To do this, you can use a simple decorator.
How to get model or object name in Django templates.