Blog

Blog

Where should we use content types and generic relations in django?

Who is this tutorial for?

This tutorial assumes a basic knowledge of PYTHON and Django. Also it assumes you know how to create models, and manipulate them with basic querysets. If you are not confident about the aforementioned topics then this might help you.

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.

Recent Posts

Archive

2018
2017
2016
2015
2014

Tags

Authors

Feeds

RSS / Atom