Ticket #5968: allowiterable_2.diff
File allowiterable_2.diff, 1006 bytes (added by , 17 years ago) |
---|
-
django/contrib/databrowse/sites.py
85 85 If a model is already registered, this will raise AlreadyRegistered. 86 86 """ 87 87 databrowse_class = databrowse_class or DefaultModelDatabrowse 88 if issubclass(model_or_iterable, models.Model):88 if not hasattr(model_or_iterable, "__iter__"): 89 89 model_or_iterable = [model_or_iterable] 90 90 for model in model_or_iterable: 91 91 if model in self.registry: … … 98 98 99 99 If a model isn't already registered, this will raise NotRegistered. 100 100 """ 101 if issubclass(model_or_iterable, models.Model):101 if not hasattr(model_or_iterable, "__iter__"): 102 102 model_or_iterable = [model_or_iterable] 103 103 for model in model_or_iterable: 104 104 if model not in self.registry: