Successfully merged staging file upload and local file upload views and forms

This commit is contained in:
Roberto Rosario
2011-02-07 00:58:09 -04:00
parent 33e8dcf4dc
commit 07e2ca0e7f
5 changed files with 99 additions and 29 deletions

View File

@@ -54,7 +54,7 @@ class Document(models.Model):
Inherit this model to customise document metadata, see BasicDocument for an example.
"""
document_type = models.ForeignKey(DocumentType, verbose_name=_(u'document type'))
file = models.FileField(upload_to=get_filename_from_uuid, storage=STORAGE_BACKEND())
file = models.FileField(upload_to=get_filename_from_uuid, storage=STORAGE_BACKEND(), verbose_name=_(u'file'))
uuid = models.CharField(max_length=48, default=UUID_FUNCTION(), blank=True, editable=False)
file_mimetype = models.CharField(max_length=64, default='', editable=False)
file_filename = models.CharField(max_length=64, default='', editable=False)