question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supply .Meta.verbose_name_plural for all models

See original GitHub issue

As …

Austin - Network Automation Engineer

I want …

all the models present in Nautobot to have a verbose_name_plural field under Meta.

So that …

I can use this field to build URLs when I only have the model name in singular, needed for example when syncing relationship associations with SSoT.

I know this is done when…

There is a verbose_name_plural field under the Meta class for all of the models.

Optional - Feature groups this request pertains to.

  • Automation
  • Circuits
  • DCIM
  • IPAM
  • Misc (including Data Sources)
  • Organization
  • Plugins (and other Extensibility)
  • Security (Secrets, etc)
  • Image Management
  • UI/UX
  • Documentation
  • Other (not directly a platform feature)

Database Changes

None

External Dependencies

None

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bryanculvercommented, Sep 9, 2022

Already available via Django _meta API and documented as such.

0reactions
bryanculvercommented, Sep 9, 2022

And this would be an API that we can safely consume, although it is prefixed with an underscore?

Yes, although it does feel weird I agree: https://docs.djangoproject.com/en/3.2/ref/models/meta/ & https://docs.djangoproject.com/en/3.2/topics/i18n/translation/#pluralization

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django 2.1 -- Display model verbose_name from meta in ...
I am trying to access the Model's verbose_name ('UniqueNameExample') AND the model_list in the view. I've tried registering a filter, a tag, and ......
Read more >
Model Meta options - Django documentation
This document explains all the possible metadata options that you can give your model in its internal class Meta . Available Meta options¶....
Read more >
verbose_name and verbose_name_plural in Django- Explained
In this article, we explain verbose_name and verbose_name_plural in Django. ... So, like any database table creation, we import models from django.db.
Read more >
django meta class attributes Code Example
Model Meta is basically used to change the behavior of your model fields like changing order options,verbose_name and lot of other options.
Read more >
How Django Uses Metaclasses For Data Modelling - Medium
From there, Django handles all the boilerplate plumbling code to sync your new data model with a backend database table via manage.py ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found