Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you change a field label in the Django Admin application?

As the title suggests. I want to be able to change the label of a single field in the admin application. I'm aware of the Form.field attribute, but how do I get my Model or ModelAdmin to pass along that information?

like image 852
Josh Smeaton Avatar asked Dec 13 '08 10:12

Josh Smeaton


People also ask

How do I change app label in Django admin?

Rename the folder which is in your project root. Change any references to your app in their dependencies, i.e. the app's views, the urls.py and settings.py files. Edit the database table django_content_type with the following command: UPDATE django_content_type SET app_label='' WHERE app_label=''

How do I make a field editable in Django?

To use editable in a field you must specify either of following settings: null=True and blank=True, so that your field doesn't give required error during model save.

What we can do in admin portal in Django?

Overview. The Django admin application can use your models to automatically build a site area that you can use to create, view, update, and delete records. This can save you a lot of time during development, making it very easy to test your models and get a feel for whether you have the right data.


1 Answers

the verbose name of the field is the (optional) first parameter at field construction.

like image 58
Javier Avatar answered Sep 28 '22 04:09

Javier