On 7/27/06, Joe <[EMAIL PROTECTED]> wrote:
>
> You could just strip the path out and get the filename when you extract
> the file from the database. Something like:
>
> def get_file_without_path(self):
> start=self.file.rfind('/')
>
> return self.file[start+1:]
umm.. os.path.basename() would probably be better than assuming '/'
(or anything else) is the path delimiter, no?
--
John Lenton ([EMAIL PROTECTED]) -- Random fortune:
The trouble with a lot of self-made men is that they worship their creator.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---