From 61563cef5897fec91a62829b3805670438fdd671 Mon Sep 17 00:00:00 2001 From: sanj Date: Sun, 14 Mar 2010 22:33:43 +0530 Subject: [PATCH] erang backend --- itf/erang/models.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/itf/erang/models.py b/itf/erang/models.py index e9f8172..7c2f482 100644 --- a/itf/erang/models.py +++ b/itf/erang/models.py @@ -1,7 +1,7 @@ from django.db import models import datetime from django.db.models.signals import post_save -import subprocess +# import subprocess import os import codecs @@ -35,9 +35,9 @@ class Document(models.Model): title = models.CharField(max_length=500) issue = models.ForeignKey(Issue) notes = models.TextField(blank=True) - contributor = models.ForeignKey(Contributor) + contributor = models.ForeignKey(Contributor, blank=True, null=True) doc_txt = models.TextField(blank=True) - date_added = models.DateTimeField(default=datetime.datetime.now()) + date_added = models.DateTimeField(default=datetime.datetime.now(), editable=False) def txtPath(self): path = self.file.path @@ -49,10 +49,10 @@ class Document(models.Model): class Image(models.Model): file = models.FileField(upload_to='erang/images/') title = models.CharField(max_length=255) - contributor = models.ForeignKey(Contributor) + contributor = models.ForeignKey(Contributor, blank=True, null=True) issue = models.ForeignKey(Issue) notes = models.TextField(blank=True) - date_added = models.DateTimeField(default=datetime.datetime.now()) + date_added = models.DateTimeField(default=datetime.datetime.now(), editable=False) def __unicode__(self): return self.title