Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#6323 closed (invalid)

A change_view should use self.queryset_change to lookup the object

Reported by: chrj Owned by: nobody
Component: contrib.admin Version: newforms-admin
Severity: Keywords: nfa-someday
Cc: post@… Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In my opinion, a change_view should use self.queryset_change to lookup the object. This way, the queryset_change method could also be used to restrict access to the change_view (as i think it was intended?).

I have attached a short patch.

Attachments (1)

change_view_patch.diff (598 bytes) - added by chrj 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by chrj

Attachment: change_view_patch.diff added

comment:1 Changed 12 years ago by Brian Rosner

Keywords: nfa-someday added; newforms-admin removed
Triage Stage: UnreviewedDesign decision needed
Version: SVNnewforms-admin

This is a good idea. However, to make this really worth while there will need to be some changes to how the admin interface works in AdminSite. Instead of linking to the models the navigation system could be improved to link to arbitrary ModelAdmin objects that may all have different views on to the objects of the model. This would also help make row level permissions possible. Tagging as nfa-someday so it can be looked at when the bigger picture gets looked at.

comment:2 Changed 12 years ago by Bela Hausmann <post@…>

Cc: post@… added

comment:3 Changed 12 years ago by jkocherhans

Resolution: invalid
Status: newclosed

This shouldn't be necessary after [7275].

comment:4 Changed 11 years ago by Bela Hausmann <post@…>

In my opinion, this is not really fixed.
For example: I have a public_objects manager (which is the default manager) and I have my normal objects manager (which includes more objects than the public manger) which I want to use in the Administration. When I overload the queryset method I see all objects in the changelist view, but objects which are not in the default manager can not be edited or deleted because those views still look up the default manager!

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