Code

Opened 2 years ago

Closed 2 years ago

#17902 closed New feature (wontfix)

Help_text for models

Reported by: BerislavLopac Owned by: nobody
Component: Database layer (models, ORM) Version: 1.4-alpha-1
Severity: Normal Keywords: models help_text
Cc: lemaire.adrien@… Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

It would be useful if models would have a help_text attribute, similar to the one on fields. It would best be a Meta class attribute, but accessible globally from the model. It would be used by admin interface as well as ModelForm to show default information/instructions about the model.

I'd write that myself but I'm currently extremely short of time, so I'm putting it here for future reference and inspiration. Occasionally I have used the model's docstring for this purpose, but it's not as simple to internationalize.

Attachments (0)

Change History (2)

comment:1 Changed 2 years ago by Fandekasp

  • Cc lemaire.adrien@… added
  • Easy pickings set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

help_text attributes for models would be only useful for admins and developers. But aren't Model.__unicode__() and Model.__doc__() enough already for that ?

Last edited 2 years ago by Fandekasp (previous) (diff)

comment:2 Changed 2 years ago by russellm

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

I'm afraid I don't see the need for this. As pointed out by @Fandekasp, there are existing mechanisms for documenting model classes; we don't need to invent a new one. help_text is required on fields for per-instance documentation of field usage; however, there is no analog for models that I can think of.

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.