Changes between Version 7 and Version 8 of CustomUploadAndFilters


Ignore:
Timestamp:
08/10/07 08:42:01 (8 years ago)
Author:
olau@…
Comment:

Added support for verbose description to AutoImageField and AutoFileField

Legend:

Unmodified
Added
Removed
Modified
  • CustomUploadAndFilters

    v7 v8  
    1212
    1313There are similar approaches by [http://www.verdjn.com/ VERDJN].
     14
     15Update: added support for verbose name.
    1416
    1517== Custom upload fields ==
     
    126128    """
    127129   
    128     def __init__(self, **kwargs):
     130    def __init__(self, verbose=None, **kwargs):
    129131        # Adjust the upload_to parameter
    130132        kwargs = init_path(self, **kwargs)
    131133       
    132         super(AutoFileField, self).__init__(**kwargs)
     134        super(AutoFileField, self).__init__(verbose, **kwargs)
    133135    # def __init__
    134136   
     
    163165    """
    164166   
    165     def __init__(self, max_width=None, max_height=None, crop=False, **kwargs):
     167    def __init__(self, verbose=None, max_width=None, max_height=None, crop=False, **kwargs):
    166168        # Adjust the upload_to parameter
    167169        kwargs = init_path(self, **kwargs)
     
    173175        self.width_field, self.height_field = 'width', 'height'
    174176       
    175         super(AutoImageField, self).__init__(**kwargs)
     177        super(AutoImageField, self).__init__(verbose, **kwargs)
    176178    # def __init__
    177179   
Back to Top