Permalink
Browse files

Fixed #8519: report the correct class in databrowse's `AlreadyRegiste…

…red` error. Thanks, mattmcc.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 0a6314f commit ab7eabfcd1bdc51c15bf66e39ad389add4fc676d @jacobian jacobian committed Aug 25, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/contrib/databrowse/sites.py
@@ -89,7 +89,7 @@ def register(self, model_or_iterable, databrowse_class=None, **options):
model_or_iterable = [model_or_iterable]
for model in model_or_iterable:
if model in self.registry:
- raise AlreadyRegistered('The model %s is already registered' % model.__class__.__name__)
+ raise AlreadyRegistered('The model %s is already registered' % model.__name__)
self.registry[model] = databrowse_class
def unregister(self, model_or_iterable):
@@ -102,7 +102,7 @@ def unregister(self, model_or_iterable):
model_or_iterable = [model_or_iterable]
for model in model_or_iterable:
if model not in self.registry:
- raise NotRegistered('The model %s is not registered' % model.__class__.__name__)
+ raise NotRegistered('The model %s is not registered' % model.__name__)
del self.registry[model]
def root(self, request, url):

0 comments on commit ab7eabf

Please sign in to comment.