PageView

Stories about Python, Django and Web Development

Dealing With QueryString Parameters

Dealing With QueryString Parameters

It is kinda tough to describe what the problem really is. But, do you know when you are creating an interface where you provide pagination, filters and ordering, and you are keeping the state via URL Get parameters?

Read more



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



Django Tips #10 AuthenticationForm Custom Login Policy

Django Tips #10 AuthenticationForm Custom Login Policy

Since I started working with Django, I never had to spend time implementing authentication related stuff. The built-in authentication system is great and it’s very easy to plug-in and get started. Now, even if need to customize, Django makes it easy. That’s what this tip is about.

Read more



How to Use django-import-export

How to Use django-import-export

As the name suggests, this is a library to handle importing and exporting data. The django-import-export library supports multiple formats, including xls, csv, json, yaml, and all other formats supported by tablib. It also have a Django admin integration, which is really convenient to use.

Read more



Exploring Django Utils #1

Exploring Django Utils #1

Exploring the Django source code I ended up discovering some really nice utility functions that I wasn’t aware of. I thought about sharing with you guys in a form of reference-like article. There are great stuff there, so I decided to break this post into a few parts.

Read more



How to Deploy Django Applications on Heroku

How to Deploy Django Applications on Heroku

Heroku is a cloud application platform, it is basically a Platform-as-a-Service (PaaS). They support several programming languages, including Python. It is very easy to deploy Django applications on Heroku. They also offer a free plan, which is quite limited, but it is great to get started and to host demos of Django applications.

Read more