from datetime import datetime, timedelta N = 2 date_N_days_ago = datetime.now() - timedelta(days=N) print datetime.now() print date_N_days_ago Results: 2010-10-16 00:06:06.000201 2010-10-14 00:06:06.000107 For more information see the timedelta docum…
===================== Model field reference ===================== .. module:: django.db.models.fields :synopsis: Built-in field types. .. currentmodule:: django.db.models This document contains all the API references of :class:Field including the fie…