Sunday, January 6, 2013

Re: Change label/title from an application added to django admin

Currently, there isn't a proper way of doing it. I will say that your best choice is to edit the template for the admin "index" and the "app index" so if app_name is "Emp" call it other way.

I know it's a dirty hack but currently there is no "standard" application on django so there isn't an editable app_name. There is an app_label but it's used when you have models on other places than models.py or something like that then, app_name is get from the app_label which is the last term in the installed_apps string splitted by dots but I think it actually get's it from the model namespace, as the second last term. myapp.Model then app_label is myapp. some.thing.other.Model think it's other.

El domingo, 23 de diciembre de 2012 19:02:21 UTC-3, Emiliano Dalla Verde Marcozzi escribió:
Hello,
I created an app called 'emp' with the command: django-admin.py startapp emp.
Then, i edited my models.py, added an admin.py file to register my clases/models
in the django admin. Now, when i login into the django admin, i have a list of
Applications, and it says 'Emp' in that list. I want to change 'Emp' for another word,
for example, 'Employee', how can i do that in django 1.4 ?
Thanks in advance,
Emiliano.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/8QUhThEXpsMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment