Opened 9 years ago

Closed 9 years ago

#1252 closed defect (fixed)

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

Reported by: the.twentysixth@… Owned by: adrian
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: UI/UX:

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@… 9 years ago.
patch file (b.c. above description does not contain whole thing)

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by the.twentysixth@…

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

comment:1 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(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