Edit users in group from the Group add and edit pages.
Credit goes to this Stack Overflow answer
Installation
Works with Django version 1.8 to 3.1.
Tested with Django-supported Python versions.
Install with:
pip install django-groupadmin-users
Usage
Add ‘’groupadmin_users’’ to INSTALLED_APPS after ‘’django.contrib.auth’’. That’s it.
Alternatively, don’t add ‘’groupadmin_users’’ to INSTALLED_APPS, but use and further customize this code:
from django.contrib import admin
from django.contrib.auth.models import Group
from groupadmin_users.forms import GroupAdminForm
# Unregister the original Group admin.
admin.site.unregister(Group)
# Create a new Group admin.
class GroupAdmin(admin.ModelAdmin):
# Use our custom form.
form = GroupAdminForm
# Filter permissions horizontal as well.
filter_horizontal = ['permissions']
# Register the new Group ModelAdmin.
admin.site.register(Group, GroupAdmin)
Demo
Example image from Stack Overflow answer:
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-groupadmin-users-0.3.4.tar.gz.
File metadata
- Download URL: django-groupadmin-users-0.3.4.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50311c0362191664d9e27457d4014fe3126ec8e04702b10827433e45e650f0f5
|
|
| MD5 |
cd8401610f0b11e28cb37fc07ee79582
|
|
| BLAKE2b-256 |
e08ec1c1af76ba05fceae7c2c076d845cf0f109cd63670fe373f7d1a1c496b62
|