Opened 10 years ago

Closed 9 years ago

#6010 closed (fixed)

Extra context for newforms admin views

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

Description

It would be very useful to have some hooks for adding context variables for pages in newforms admin.

I am sorry, my patch depends on some other patches - it is for simple merging. So my patch can't be applied without problem. But I would like to prepare proper patch, if it would be accepted.

Attachments (2)

03-admin-extra-context.diff (4.0 KB) - added by Petr Marhoun <petr.marhoun@…> 10 years ago.
01-admin-extra-context.diff (4.1 KB) - added by Petr Marhoun <petr.marhoun@…> 10 years ago.
new version can be applied agains newforms-admin

Download all attachments as: .zip

Change History (11)

Changed 10 years ago by Petr Marhoun <petr.marhoun@…>

Attachment: 03-admin-extra-context.diff added

comment:1 Changed 10 years ago by Simon G <dev@…>

Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 10 years ago by Karen Tracey <kmtracey@…>

Keywords: nfa-someday added
Needs documentation: set
Needs tests: set

This (if it is decided to do it) is new function that can wait until after merge to trunk. Would also need docs and tests.

Changed 10 years ago by Petr Marhoun <petr.marhoun@…>

Attachment: 01-admin-extra-context.diff added

new version can be applied agains newforms-admin

comment:3 Changed 10 years ago by Lllama <f.ingram.lists@…>

Keywords: nfa-someday removed

I'd just like to add my vote for this patch. At the moment pumping extra variables into the admin's index view is kinda non-triv. Either you need to replace the index method with your own (using new.instancemethod magic) or subclass AdminSite (which requires reregistering auth models etc).

I'd also say that the needs_docs and needs_tests flags could be a little premature given that the branch isn't really documented and there are no tests for AdminSites anyway. (That's not a criticism, just an observation).

I am removing the nfa-someday tag, as I think that this is a useful patch in line with the aims of the branch. I quote:

Give developers extra hooks into the admin-site functionality. (Yes, this is a broad goal. More examples are forthcoming.)

comment:4 in reply to:  3 Changed 10 years ago by Karen Tracey <kmtracey@…>

Replying to Lllama <f.ingram.lists@gmail.com>:

I am removing the nfa-someday tag, as I think that this is a useful patch in line with the aims of the branch.

nfa-someday just means this ticket should not be considered blocking for a merge back to trunk. Does lack of this feature mean newforms-admin lacks some capability that current admin has, so that merging newforms-admin would reduce functionality for trunk users? If not, then nfa-someday is the appropriate tag. If this feature is needed to preserve/migrate some functionality already existing in current admin then nfa-blocker would be the appropriate tag. Simply removing the tag means someone has to go look at this ticket again and figure out which one it should be.

comment:5 Changed 10 years ago by James Bennett

Keywords: nfa-someday added

Restoring nfa-someday, because it's not something which should block newforms-admin at this point; the fact that newforms-admin aims to make it easier to hook into the admin does not automatically mean that a given idea for doing so should hold things up.

comment:6 Changed 10 years ago by Lllama <f.ingram.lists@…>

Oops. A slight misreading of the tag on my part. "No further action - someday" seemed to represent a time in the very, very distant future.

I will play devil's advocate, however, and make the argument that a decision should be made about this ticket (or at least the ideas it represents) before the merge into trunk. At the moment the branch defines a very useful set of hooks but, in my experience of using the branch, these are incomplete. The new admin is a very powerful framework in itself on which to build a full application, and these extra hooks (and a few more) would be very useful. Defining them before the merge, or at least deciding on a common pattern of how they should look, will help once everyone makes the switch and starts requesting their own.

comment:7 Changed 10 years ago by Brian Rosner

I would imagine whatever gets done with #6735 would eventually find its way into the admin code after a merge to trunk.

comment:8 Changed 9 years ago by anonymous

Cc: schlaber@… added

comment:9 Changed 9 years ago by Bernd Schlapsi

Cc: schlaber@… removed
Resolution: fixed
Status: newclosed

I think changeset:7627 fixed this problem

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