Hi,
Suppose I have the following model:
class Document(BaseModel):
name = models.CharField(max_length=150,blank=True)
description = models.TextField(blank=True)
file =
Models.FileField(upload_to="data/documentation/document/%Y/%m/%d",blank=True)
And suppose I've a model I created through the admin interface and
uploaded a file named "document1.pdf"
Then, when modifying this database entry (in admin->change_form) I see
the previous value as data/documentation/document/2009/01/03/document1.pdf"
Is there any way to get this value shown as just "document1.pdf" without
the relative path?...... What i want, is to hide to the end user the
filesystem location of the uploaded file.
I've accomplished this in the change_list by defining a custom method on
the model that returns just the file name.
Thank you very much.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---