Ticket #17556: media_inherit.diff

File media_inherit.diff, 664 bytes (added by Aleksander Zdyb, 13 years ago)
  • django/forms/widgets.py

     
    88import datetime
    99from itertools import chain
    1010from urlparse import urljoin
     11from inspect import getmembers
    1112
    1213from django.conf import settings
    1314from django.forms.util import flatatt, to_current_timezone
     
    3233class Media(StrAndUnicode):
    3334    def __init__(self, media=None, **kwargs):
    3435        if media:
    35             media_attrs = media.__dict__
     36            media_attrs = dict(getmembers(media))
    3637        else:
    3738            media_attrs = kwargs
    3839
Back to Top