Ticket #8519: 8519-1.diff
File 8519-1.diff, 1.1 KB (added by , 16 years ago) |
---|
-
django/contrib/databrowse/sites.py
89 89 model_or_iterable = [model_or_iterable] 90 90 for model in model_or_iterable: 91 91 if model in self.registry: 92 raise AlreadyRegistered('The model %s is already registered' % model.__ class__.__name__)92 raise AlreadyRegistered('The model %s is already registered' % model.__name__) 93 93 self.registry[model] = databrowse_class 94 94 95 95 def unregister(self, model_or_iterable): … … 102 102 model_or_iterable = [model_or_iterable] 103 103 for model in model_or_iterable: 104 104 if model not in self.registry: 105 raise NotRegistered('The model %s is not registered' % model.__ class__.__name__)105 raise NotRegistered('The model %s is not registered' % model.__name__) 106 106 del self.registry[model] 107 107 108 108 def root(self, request, url):