Verbose name app in django admin interface

In the Django administration interface, we have our models grouped by application. Well, I knew how to customize the model name:

class MyModel (models.Model):
  class Meta:
    verbose_name = 'My Model'
    verbose_name_plural = 'My Models'   

But I could not configure the name of the application. Is there a verbose_name for applications?

+5
source share
3 answers

Since django 1.7 app_label is not working. You must follow the instructions https://docs.djangoproject.com/en/1.7/ref/applications/#for-application-authors . I.e:

  • Create apps.pyin the application directory
  • Enter a detailed name:

    # myapp/apps.py
    
    from django.apps import AppConfig
    
    class MyAppConfig(AppConfig):
        name = 'myapp'
        verbose_name = "Rock ’n’ roll"
    
  • In the project settings, change INSTALLED_APPS:

    INSTALLED_APPS = [
        'myapp.apps.MyAppConfig',
        # ...
    ]
    

    , myapp.apps INSTALLED_APPS AppConfig :

    # myapp/__init__.py
    
    default_app_config = 'myapp.apps.MyAppConfig'
    

alles:)

+13

Meta app_label , , , .

- i18n. po, msgid app_label, .

/ po * app_label > locale > ru > django.po *

#set app label string 
msgid <app_label>
msgstr "  "

.

+1

app_label attr MyModel META

class MyModel (models.Model):
  class Meta:
    verbose_name = 'My Model'
    verbose_name_plural = 'My Models'
    app_label = 'wow_app_name'
-1

All Articles