#17498: meta option "no_index"
-------------------------------+------------------------------------
Reporter: kace | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version:
Severity: Normal | Resolution:
Keywords: admin | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by julien):
* needs_better_patch: 0 => 1
* easy: 1 => 0
Comment:
Thank you all for your work on this ticket.
While I understand and appreciate the need for excluding certain models
from the general index and app indexes, I'm not sold on the suggested
approach. The long-term goal for the admin is to provide more flexibility
around the admin's structure and workflows, and adding a 'no_index' option
would tie `ModelAdmin` to the idea that an index would systematically be
part of the structure.
On this basis, I'm going to reject the current pull request.
The index functionality is currently already tied to
`contrib.admin.sites.AdminSite`. It should already be possible to exclude
models from the index by overriding the `index()` and `app_index()`
methods, although I admit it probably wouldn't be pretty. A new API could
be designed to make it prettier and easier, but I believe that should be
done in `AdminSite`, not `ModelAdmin`.
--
Ticket URL: <https://code.djangoproject.com/ticket/17498#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.