Code

Opened 7 years ago

Closed 7 years ago

#4759 closed (duplicate)

[newforms-admin] fixed a bug, admin class has no 'manager' attribute

Reported by: yi.codeplayer at gmail dot com Owned by: nobody
Component: contrib.admin Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

First you need Ticket #4587, so you has model._meta.admin ,
but admin class has no attribute named 'manager', and this patch fixed this.

-        self.lookup_choices = model._meta.admin.manager.distinct().order_by(f.name).values(f.name)
+        self.lookup_choices = model._meta.admin(model).queryset(request).distinct().order_by(f.name).values(f.name)

Attachments (1)

there_is_no_admin_manager.patch (715 bytes) - added by yi.codeplayer at gmail dot com 7 years ago.
the patch itself.

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by yi.codeplayer at gmail dot com

the patch itself.

comment:1 Changed 7 years ago by jkocherhans

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

#3973 and #4699 are duplicates. We'll use #4699 as the master for no particular reason.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.