Opened 17 years ago
Closed 10 years ago
#5405 closed New feature (fixed)
Support restructured text in model docstrings
Reported by: | Matt McClanahan | Owned by: | Žan Anderle |
---|---|---|---|
Component: | contrib.admindocs | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | karld@…, andrew.tennikoff@…, tomas.ehrlich@…, gokmen@…, Žan Anderle, info+coding@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It'd be nice to be able to use ReST in the docstrings of models. The admindocs views currently parse ReST for template tags, filters, and views, but not models.
Attachments (3)
Change History (30)
by , 17 years ago
Attachment: | 5405-1.diff added |
---|
comment:1 by , 17 years ago
Has patch: | set |
---|
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
Since the other things in admin_docs support rst, then we should be consistent.
comment:3 by , 17 years ago
Keywords: | nfa-someday added |
---|
This ticket isn't critical for merging newforms-admin into trunk. Tagging with nfa-someday. Looks like this would be a good improvement and make things consistent.
comment:4 by , 17 years ago
milestone: | → 1.0 |
---|
comment:5 by , 16 years ago
milestone: | 1.0 → post-1.0 |
---|---|
Triage Stage: | Ready for checkin → Accepted |
Version: | newforms-admin → SVN |
comment:6 by , 16 years ago
Cc: | added |
---|
comment:7 by , 16 years ago
Cc: | added |
---|
comment:9 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:10 by , 14 years ago
Easy pickings: | unset |
---|---|
Needs tests: | set |
comment:13 by , 12 years ago
Cc: | added |
---|---|
Component: | contrib.admin → contrib.admindocs |
comment:14 by , 12 years ago
Also duplicated by #17599 which has very similar patch. I'll post updated version soon.
by , 12 years ago
Attachment: | 5405-view-detail.diff added |
---|
comment:15 by , 12 years ago
Patch updated, but I'm not sure how to write tests. There're no similar tests in django.contrib.admindocs.tests
. I renamed body
in original patch to description
to keep the backward compatibility (in case someone has it's own version of model_detail.html
).
Also, the ticket #17599 is talking about model_detail only, but there's another misleading information in docs, about using :model:
reference in view function. It didn't work for me and I've found there's a striptags filter, which strips all generated links. It's included in the second patch.
comment:17 by , 12 years ago
Patch needs improvement: | unset |
---|
comment:18 by , 12 years ago
https://github.com/django/django/pull/760
i need to review to improve tests.
comment:19 by , 12 years ago
Cc: | added |
---|---|
Keywords: | sprint2013 added |
Owner: | changed from | to
Status: | new → assigned |
comment:20 by , 11 years ago
Needs documentation: | set |
---|---|
Needs tests: | unset |
Patch needs improvement: | set |
I left comments on the pull request but it still needs some improvement including a rebase to merge cleanly. It would also be good to mention the change in the release notes.
comment:21 by , 11 years ago
Easy pickings: | unset |
---|
comment:24 by , 10 years ago
Cc: | added |
---|---|
Owner: | changed from | to
comment:26 by , 10 years ago
Cc: | added |
---|---|
Keywords: | nfa-someday sprint2013 removed |
Needs documentation: | unset |
Patch needs improvement: | unset |
Triage Stage: | Accepted → Ready for checkin |
The patch looks good to me.
comment:27 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
There's a possibility that this patch breaks backwards compatibility if a user overrides the
admin_doc/model_detail.html
template.