#28771: Add a model field option that corresponds to the short_description admin
property
-------------------------------------+-------------------------------------
     Reporter:  Rick Graves          |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  1.11
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  admin listview       |             Triage Stage:
  column names                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Rick Graves):

 Two points:

 1) verbose_name is a property of the column, but short_description is not,
 BECAUSE it has already been put somewhere else.

 2) Putting short_description somewhere else wastes CPU ticks.  Not a huge
 deal, but sub optimal.  On the admin listing, if all you want is a short
 description as a column heading, you must do that by writing a function
 returning the column value that must execute for every row down the page.
 Executing the function to return the value takes more CPU ticks than the
 putting in the default, the column value.  Not only that, if the column is
 Boolean, the function loses the cute green check and red X graphic,
 instead you get somewhat austere "True" and "False".  So to get a
 short_description at the top of the Boolean column without the austere
 "True" or "False", you must write a more involved function -- just to get
 a short_description at the top of the column.

 Again, I concede there may be higher priorities.  But as to whether the
 choice to put short_description  somewhere other than as a column property
 is optimal, you could consult anyone without a conflict of interest
 proficient in object oriented or database design.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28771#comment:2>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.a98c4cef7c3f5c173b86c97d5d39b2cb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to