views:

308

answers:

2

Hi,

I live in Norway, and when i make Django apps i would like to be able to name my apps with characters like "æøå", these characters work fine in unicode, but when i try to use these characters in app names, or in fields display text i get an error.

Even better, i would like to name my apps by the english convention, but have something like "verbose_name" for apps, not only for models.

So is there possible to set a display name for apps, and not only for models? And how to i use unicode characters in the admin interface?

+1  A: 

It's a dirty hack from http://softwaremaniacs.org/forum/django/716/ (in Russian)

In the /django/contrib/admin/templates/index.html change

<caption>{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</caption>

to

<caption>{% trans app.name %}</caption>

In the models.py:

class Meta:
    verbose_name = _("Module name")
Igorekk
Isnt this just for the model, and not for the app it self? Or do i misunderstand?The Meta class, is this a subclass of a model, or is it a base class in the models.py file? When i try it as a base class i get an error because of the "_" in the _("Module name") Any ideas?
Espen Christensen
+1  A: 

I would strongly recommend against attempting to use unicode in your apps. This stems from the fact that the name is currently derived from the name of the directory your app resides in. This is supposed to change in future, allowing for a verbose name for the app, but at the moment it isn't possible.

Also remember that with programming the defacto standard for naming and documentation is english.

Soviut