#3538: [Patch] Add get_FOO_basename() for FileFields
-----------------------------------------------------+----------------------
   Reporter:  Herbert Poul <[EMAIL PROTECTED]>  |                Owner:  adrian 
          
     Status:  closed                                 |            Component:  
Core framework   
    Version:  SVN                                    |           Resolution:  
wontfix          
   Keywords:  filefield basename filename            |                Stage:  
Ready for checkin
  Has_patch:  1                                      |           Needs_docs:  0 
               
Needs_tests:  0                                      |   Needs_better_patch:  0 
               
-----------------------------------------------------+----------------------
Comment (by Herbert Poul <[EMAIL PROTECTED]>):

 imho... if you have a model with a fileupload .. it makes most sense to
 display the filename in a template..
 you will never need the full path or path relative to MEDIA_ROOT ..
 
 so .. i think basename is more useful than the current 'filename' ..
 because if i ever need 'filename' it's in a view where i can use python
 code like os.path .. while in a template where i want to output a file's
 name i need the basename..
 
 of course.. i could simply write a custom method for my model or a
 template filter.. but i think outputting the name of an uploaded file is
 somewhat the basic functionality for a fileupload ?
 
 it would be nice if you could rethink this.. it's just 2 lines of code..
 but anyway .. maybe i'm missing some important point here.. so i leave the
 ticket closed ..

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3538#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to