enter image description here
I wanna change the title of my models in Django admin
page. Should I edit the models.py and how?
Also if you have any suggestion for learning Django I would be so grateful.
elifcs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2
you need to add the following field in your apps.py file :
verbose_name = 'the custom title'
Hasan Diab is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
So, in your case the app is named “Countries”, so you get that in admin panel. But here’s how you can change it: First, navigate to the apps.py file in your countries app and make edits to the class like so:
class CountriesConfig(AppConfig):
name = 'countries'
verbose_name = 'Type the title you want here'
Next, head over to your __init__.py
file within your app and add the following line:
default_app_config = 'countries.apps.CountriesConfig'
For more details, you can check out this page 🙂
1