PageView

Stories about Python, Django and Web Development

How to Create Django Data Migrations

How to Create Django Data Migrations

Data Migration is a very convenient way to change the data in the database in conjunction with changes in the schema. They work like a regular schema migration. Django keep track of dependencies, order of execution and if the application already applied a given data migration or not.

Read more



A Complete Beginner's Guide to Django - Part 4

A Complete Beginner's Guide to Django - Part 4
This tutorial is going to be all about Django's authentication system. We are going to implement the whole thing, registration, login, logout, password reset, and password change.

Read more



A Complete Beginner's Guide to Django - Part 3

A Complete Beginner's Guide to Django - Part 3
In this tutorial we are going to dive deep into two fundamental concepts, URLs and Forms. In the process we are going to explore many other concepts like creating reusable templates and installing third party libraries. We are also going to write plenty of unit tests.

Read more



A Complete Beginner's Guide to Django - Part 2

A Complete Beginner's Guide to Django - Part 2
Welcome to the second part of our Django Tutorial! In the previous lesson, we installed everything that we needed. Hopefully, you are all setup with Python 3.6 installed and Django 1.11 running inside a Virtual Environment. We already created the project we are going to play around. In this lesson, we are going to keep writing code in the same project.

Read more



A Complete Beginner's Guide to Django - Part 1

A Complete Beginner's Guide to Django - Part 1
I'm starting today a new tutorial series about the Django fundamentals. It's a complete beginner's guide to start learning Django. The material is divided in 7 parts. We're going to explore all the basic concepts in great detail, from installation, preparation of the development environment, models, views, templates, urls to more advanced topics such as migrations, testing and deployment.

Read more



How to Use Celery and RabbitMQ with Django

How to Use Celery and RabbitMQ with Django

Celery is an asynchronous task queue based on distributed message passing. Task queues are used as a strategy to distribute the workload between threads/machines. In this tutorial I will explain how to install and setup Celery + RabbitMQ to execute asynchronous in a Django application.

Read more



How to Render Django Form Manually

How to Render Django Form Manually

Dealing with user input is a very common task in any Web application or Web site. The standard way to do it is through HTML forms, where the user input some data, submit it to the server, and then the server does something with it. Now, the chances are that you might have already heard that quote: “All input is evil!” I don’t know who said that first, but it was very well said. Truth is, every input in your application is a door, a potential attack vector. So you better secure all doors! To make your life easier, and to give you some peace of mind, Django offers a very rich, reliable and secure forms API. And you should definitely use it, no matter how simple your HTML form is.

Read more



Django Tips #21 Using The Redirects App

Django Tips #21 Using The Redirects App

Django comes with a few optional apps that can easily be installed. One of those apps is the Redirects App, which is particularly useful in the cases where you want to update some existing URLs without compromising your Website SEO or in any case avoid 404 errors.

Read more



A Minimal Django Application

A Minimal Django Application

In this article I want to explore some of the basic concepts of Django, setting up a minimal web application to get a deeper understanding of how Django works under the hoods.

Read more



Ask Vitor #4: WordPress or Self-Made Blog?

Ask Vitor #4: WordPress or Self-Made Blog?

Aviral Tiwari asks:

Is this blog made through Django or some blog engine like WordPress?

Read more