Django

Code

Ticket #8519 (closed: fixed)

Opened 3 months ago

Last modified 3 months ago

databrowse.site.register reports "The model ModelBase is already registered" instead of naming the actual model

Reported by: ramalho Assigned to: nobody
Milestone: 1.0 Component: django.contrib.databrowse
Version: 1.0-beta-1 Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

This is another manifestation of bug #4696, but in a different piece of code.

django.contrib.databrowse.site, in function register (line 92) is:

raise AlreadyRegistered('The model %s is already registered' % model.__class__.__name__)

should be:

raise AlreadyRegistered('The model %s is already registered' % model.__name__)

Attachments

8519-1.diff (1.1 kB) - added by mattmcc on 08/24/08 19:50:22.

Change History

08/24/08 11:05:06 changed by ramalho

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

BTW, I just noticed that the same problem existis a few lines below in the same source code file, django.contrib.databrowse.site, but in function unregister (line 105):

                raise NotRegistered('The model %s is not registered' % model.__class__.__name__)

shoul be

                raise NotRegistered('The model %s is not registered' % model.__name__)

08/24/08 19:50:22 changed by mattmcc

  • attachment 8519-1.diff added.

08/24/08 19:51:26 changed by mattmcc

  • has_patch set to 1.
  • stage changed from Unreviewed to Ready for checkin.

08/25/08 13:32:27 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

(In [8547]) Fixed #8519: report the correct class in databrowse's AlreadyRegistered error. Thanks, mattmcc.


Add/Change #8519 (databrowse.site.register reports "The model ModelBase is already registered" instead of naming the actual model)




Change Properties
Action