#22812 closed Cleanup/optimization (fixed)
Reformat and restructure lookup API documentation
Reported by: | jorgecarleitao | Owned by: | jorgecarleitao |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Currently the API documentation docs/ref/models/custom-lookups.txt has some formatting issues, and mixes the howto with the API references, see https://docs.djangoproject.com/en/dev/ref/models/custom-lookups/
Here I'm proposing to separate these two concepts:
- Adding a new howto - docs/howto/custom-lookups.txt - for custom lookups, which includes section https://docs.djangoproject.com/en/dev/ref/models/custom-lookups/#a-simple-lookup-example to section https://docs.djangoproject.com/en/dev/ref/models/custom-lookups/#how-django-determines-the-lookups-and-transforms-which-are-used with potential improvements.
- Renaming "custom-lookups.txt" to "lookups.txt" in ref/models to be the documentation of lookups API, with references for the public interfaces of
RegisterLookupMixin
,Lookup
,Transform
.
Optionally, because the BuiltIn lookups are part of this new API, they could be documented in 2., but this may not be possible due to backward compatibility of documentation urls (devs?)
Change History (7)
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 11 years ago
Easy pickings: | set |
---|
comment:3 by , 11 years ago
Has patch: | set |
---|
Pull request here: https://github.com/django/django/pull/2807
At some point we need to discuss what more can be merged on ref/models/lookups. E.g. could make sense to add the builtin lookups there.
comment:4 by , 11 years ago
Patch needs improvement: | set |
---|
I think it would be better not to move the built-in lookups for the reason you mentioned.
comment:5 by , 10 years ago
Patch needs improvement: | unset |
---|
comment:6 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
If the structure of the documentation needs to change then it needs to change - we don't need to worry too much about URLs in such a case.