PageView

Stories about Python, Django and Web Development

Django Tips #12 Disabling Migrations to Speed Up Unit Tests

Django Tips #12 Disabling Migrations to Speed Up Unit Tests

The model migrations are certainly a great feature of the Django framework. But, when it comes down to running tests, it really slows down the process. Especially if your migration history is big. This is a simple tip to speed up your tests.

Read more



How to Use Python Pendulum Library

How to Use Python Pendulum Library

Pendulum is a Python library to make your life easier when it comes down to work with date/time.

Read more



Exploring Django Utils #2

Exploring Django Utils #2

Last week I started a post series exploring the django.utils module. In this second part I will be focusing more on the html module.

Read more



Django Tips #11 Custom Manager With Chainable QuerySets

Django Tips #11 Custom Manager With Chainable QuerySets
In a Django model, the Manager is the interface that interacts with the database. By default the manager is available through the Model.objects property. The default manager every Django model gets out of the box is the django.db.models.Manager. It is very straightforward to extend it and change the default manager.

Read more



How to Create a Password Confirmation View

How to Create a Password Confirmation View

It is a very common practice nowadays to keep alive signed in user sessions for a very long time. But some web pages usually deal with sensitive information (such as billing information or change email forms) and it is a good idea to ask the user to confirm his/her credentials. To achieve this task, we will be using the built-in check_password and the user’s last_login field.

Read more