Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django changing app name of Photologue

i have installed photologue - A customizable plug-in photo management application for the Django web framework here into my project without problem...

now i want to change app name in admin page which is photologue. for this i have used ugettext_lazy but i got an error when i define this to all Meta:

from django.utils.translation import ugettext_lazy as _

class Meta:
    app_label = _('newappname')

Error:

ValueError at /admin/

Cannot create form field for 'effect' yet, because its related model 
'PhotoEffect' has not been loaded yet

Is there any easy way for changing app name, i have looked a lot but didnt find...

like image 250
Aragon Avatar asked Nov 04 '22 20:11

Aragon


1 Answers

Django does not support app renaming in the admin right now, but ticket #3591 was raised to add that functionality, so hopefully it will be added.

There are several ways of acomplishing that. The simplest and preferred would be changing the main admin template and using whatever name you want as the app name there.

Other solutions:

  • How to change the name of a Django app?
  • https://stackoverflow.com/a/6312798/342473
  • http://djangosnippets.org/snippets/1882/
like image 160
Mariusz Jamro Avatar answered Nov 13 '22 18:11

Mariusz Jamro