Opened 19 years ago

Closed 19 years ago

#1252 closed defect (fixed)

[magic-removal][patch] admin/views/doc.py , model_index bug

Reported by: the.twentysixth@… Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Module models is redefined as a local variable models as a list. As a result models.get_installed_model_modules() produces an error.

Index: django/contrib/admin/views/doc.py
===================================================================
--- doc.py      (revision 2074)
+++ doc.py      (working copy)
@@ -137,16 +137,16 @@
     if not utils.docutils_is_available:
         return missing_docutils_page(request)

-    models = []
+    m = []
     for app in models.get_installed_model_modules():
         for model in app._MODELS:
             opts = model._meta
-            models.append({
+            m.append({
                 'name': '%s.%s' % (opts.app_label, opts.module_name),
                 'module': opts.app_label,

Attachments (1)

doc.py.diff (969 bytes ) - added by the.twentysixth@… 19 years ago.
patch file (b.c. above description does not contain whole thing)

Download all attachments as: .zip

Change History (2)

by the.twentysixth@…, 19 years ago

Attachment: doc.py.diff added

patch file (b.c. above description does not contain whole thing)

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

(In [2097]) magic-removal: Fixed #1252 -- Fixed bug in admin doc views. Thanks, the.twentysixth

Note: See TracTickets for help on using tickets.
Back to Top