erang backend

This commit is contained in:
sanj 2010-03-14 22:33:43 +05:30
parent ecd40e9b86
commit 61563cef58

View File

@ -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