From 56e15c264c48e299a036054d205b812e68d375a4 Mon Sep 17 00:00:00 2001 From: Parth Buch Date: Mon, 18 Jun 2012 17:30:09 +0530 Subject: added a created field to retrive latest video --- stapp/video/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stapp/video') diff --git a/stapp/video/models.py b/stapp/video/models.py index c7b0786..aa675b1 100644 --- a/stapp/video/models.py +++ b/stapp/video/models.py @@ -1,10 +1,12 @@ from django.db import models from django.contrib.auth.models import User + class Video(models.Model): """Videos to be uploaded..""" name = models.CharField(max_length=128) filename = models.FileField(upload_to="videos") description = models.TextField() + created = models.DateTimeField(auto_now_add=True) def __unicode__(self): return self.name -- cgit