Code

Opened 7 years ago

Closed 6 years ago

#3694 closed (duplicate)

admin docstrings not added to doc pages because of stringfilter decorator

Reported by: Simon G. <dev@…> Owned by: gwilson
Component: contrib.admin Version: master
Severity: Keywords:
Cc: dev@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The decorator stringfilter in defaultfilters.py overrides the docstrings, making the documentation for those filters in /admin/doc/filters/ empty.

This is similar to #1840, but in a different component and with a different side effect, however the discussion there might prove useful in resolving this. A possible (ugly)solution may be to call stringfilter inside all the filters which need it, rather than decorating.

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

Would another solution be to make the decorator _dec.__doc__ = func.__doc__?

comment:2 Changed 6 years ago by gwilson

  • Owner changed from nobody to gwilson
  • Triage Stage changed from Design decision needed to Accepted

comment:3 Changed 6 years ago by gwilson

  • Resolution set to duplicate
  • Status changed from new to closed

Marking this a dup of #5701 since the patch there fixes this.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.