Задать вопрос

Тел: +7 965 3737 888

558

Просмотров

2

Ответов

More information about users and groups in user admin

Add-on for auth app of newforms-admin branch, adding more information about users and their groups at user and group list in admin interface. Also, nice example on customization of contributed django admin apps.

It adds the following to the user list interface: fields for is_superuser and is_staff, last login time; by default, short names of groups user is in (mousehover to see full names) It adds the following to the to group list interface: list of users in your groups.

To enable, just put it somewhere and import it from your main urls.py: import useradmin

Вопрос полезен? Да0/Нет0
file_3923.py(1.6Кб)
None

Ответы (2):

Ответarcanosam:04.04.2012
Ответ полезен? Да0/Нет0

on django 1.4 I need to move this snippet from root project to the first app that have an admin.py.

I found that import this snippet on urls.py (on root project) gives an error because User and Group models are not yet registered by admin object. It's what I assume or seems.

That's why I try to move it for my first app that has an admin.py and works perfectly again.

see ay

Ответdvdtho:20.07.2008
Ответ полезен? Да0/Нет0

The import useradmin must come after admin.autodiscover() is called in your main urls.py in r8010.