Merged document upload code and moved it to the model, improved method of handling compressed file

This commit is contained in:
Roberto Rosario
2011-07-29 05:01:50 -04:00
parent 9d965face3
commit b64f98b667
7 changed files with 130 additions and 95 deletions

View File

@@ -257,6 +257,9 @@ class Document(models.Model):
os.unlink(self.get_cached_image_name(page)[0])
except OSError:
pass
def add_as_recent_document_for_user(self, user):
RecentDocument.objects.add_document_for_user(user, self)
class DocumentTypeFilename(models.Model):