Ticket #4571: django_newadmin_iterable.diff

File django_newadmin_iterable.diff, 916 bytes (added by Jakub Vysoky, 17 years ago)

issubclass => is not tuple or list

  • django/contrib/admin/sites.py

     
    6969        """
    7070        admin_class = admin_class or ModelAdmin
    7171        # TODO: Handle options
    72         if issubclass(model_or_iterable, Model):
     72        if type(model_or_iterable) not in (list, tuple):
    7373            model_or_iterable = [model_or_iterable]
    7474        for model in model_or_iterable:
    7575            if model in self._registry:
     
    8282
    8383        If a model isn't already registered, this will raise NotRegistered.
    8484        """
    85         if issubclass(model_or_iterable, Model):
     85        if type(model_or_iterable) not in (list, tuple):
    8686            model_or_iterable = [model_or_iterable]
    8787        for model in model_or_iterable:
    8888            if model not in self._registry:
Back to Top