Ticket #4588: handle_options.patch

File handle_options.patch, 667 bytes (added by yi.codeplayer at gmail dot com, 17 years ago)
  • django/contrib/admin/sites.py

     
    6868        If a model is already registered, this will raise AlreadyRegistered.
    6969        """
    7070        admin_class = admin_class or ModelAdmin
    71         # TODO: Handle options
     71        # it works now
     72        if options:
     73            admin_class = type(admin_class.__name__, (admin_class,), options)
    7274        if issubclass(model_or_iterable, Model):
    7375            model_or_iterable = [model_or_iterable]
    7476        for model in model_or_iterable:
Back to Top