Opened 6 years ago

Closed 6 years ago

#12796 closed (wontfix)

Change in django.db.models.options.get_verbose_name

Reported by: rafaelsdm Owned by: nobody
Component: contrib.admin Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


In order to make the code more readable I suggest to change the lambda function to a named function (def), simple like this:

def get_verbose_name(class_name):
   return re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1',class_name).lower().strip()

It came up in the Brazilian Django list[1].

[1] - pt_BR:

Change History (1)

comment:1 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

I'm not sure I understand why this is any clearer, and my portuguese isn't good enough to follow the discussion on the referenced mailing list. If you can explain why this has caused confusion, please reopen.

Note: See TracTickets for help on using tickets.
Back to Top