Blog

Viewing posts by ravi

Exploring iterators and generators in Python

Iterator

The Python's glossary defines an iterator as

Thumbnail generation for Django with Sorl-Thumbnail

Media is the common cause of slow page loading and rendering, and they occupy majority of the bandwidth. Though the costs of storage is not the matter of primary concern, the bandwidth is an important factor, especially with huge user base on mobiles. Compressing and resizing of images is best way to handle this situation.

Numeric for loop in Django templates

Django templates give us a little control over the flow of rendering. for loop is often used in the Django templates it often satisfies the needs to iterate over lists or tuples. For example, a queryset with multiple models can be iterated over in the templates with the for loop:

Managing multiple websites with a common database in Django - The 'Sites' Framework

Django provides the sites framework which allows us to associate the data (objects/models) and functionality with a particular website. This is particularly useful if you are managing multiple websites with a single code base (as in a content-management system) or multiple websites that share a common database.

Handling some practical Issues With Django querysets

In this post I would like address some the problems that developers regularly face with Querysets.

Recent Posts

Archive

2018
2017
2016
2015
2014

Tags

Authors

Feeds

RSS / Atom