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?
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:
apps.py
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
INSTALLED_APPS = [ 'myapp.apps.MyAppConfig', # ... ]
, myapp.apps INSTALLED_APPS AppConfig :
myapp.apps
# myapp/__init__.py default_app_config = 'myapp.apps.MyAppConfig'
alles:)
Meta app_label , , , .
- i18n. po, msgid app_label, .
i18n
/ po * app_label > locale > ru > django.po *
#set app label string msgid <app_label> msgstr " "
.
app_label attr MyModel META
app_label
MyModel
META
class MyModel (models.Model): class Meta: verbose_name = 'My Model' verbose_name_plural = 'My Models' app_label = 'wow_app_name'