Opened 11 years ago

Closed 11 years ago

#1252 closed defect (fixed)

[magic-removal][patch] admin/views/ , 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:


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/
---      (revision 2074)
+++      (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) (969 bytes) - added by the.twentysixth@… 11 years ago.
patch file (b.c. above description does not contain whole thing)

Download all attachments as: .zip

Change History (2)

Changed 11 years ago by the.twentysixth@…

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

comment:1 Changed 11 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