[Answered ]-Change app label of groups in Django 1.5

2👍

Try this:

from django.db.models.loading import get_models
get_models(django.contrib.auth.models)[1]._meta.app_label = 'group' #or whatever

0👍

If you need still more flexibility in the admin you could try django-admin-tools. It makes it easy to reorder and group models in different layouts (tabs, collapsible boxes, etc.) and also add dashboard-like features.

👤UloPe

0👍

Just in case anyone needs this in Django 3.0+:

from django.apps import apps
apps.get_model('auth', 'Group')._meta.app_label = 'group' #or whatever, but have to be a registered app

Please not that this will mess with django internal model handling, e.g. generate migrations in contrib.auth sitepackage and so on

Leave a comment