Ticket #8519: 8519-1.diff

File 8519-1.diff, 1.1 KB (added by Matt McClanahan, 16 years ago)
  • django/contrib/databrowse/sites.py

     
    8989            model_or_iterable = [model_or_iterable]
    9090        for model in model_or_iterable:
    9191            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__)
    9393            self.registry[model] = databrowse_class
    9494
    9595    def unregister(self, model_or_iterable):
     
    102102            model_or_iterable = [model_or_iterable]
    103103        for model in model_or_iterable:
    104104            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__)
    106106            del self.registry[model]
    107107
    108108    def root(self, request, url):
Back to Top