Opened 17 years ago
Closed 17 years ago
#6010 closed (fixed)
Extra context for newforms admin views
Reported by: | 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: | no | UI/UX: | no |
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)
Change History (11)
by , 17 years ago
Attachment: | 03-admin-extra-context.diff added |
---|
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:2 by , 17 years ago
Keywords: | nfa-someday added |
---|---|
Needs documentation: | set |
Needs tests: | set |
by , 17 years ago
Attachment: | 01-admin-extra-context.diff added |
---|
new version can be applied agains newforms-admin
follow-up: 4 comment:3 by , 17 years ago
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 by , 17 years ago
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 by , 17 years ago
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 by , 17 years ago
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 by , 17 years ago
I would imagine whatever gets done with #6735 would eventually find its way into the admin code after a merge to trunk.
comment:8 by , 17 years ago
Cc: | added |
---|
comment:9 by , 17 years ago
Cc: | removed |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I think changeset:7627 fixed this problem
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.