Python django.contrib.auth.admin.GroupAdmin() Examples

The following are 1 code examples for showing how to use django.contrib.auth.admin.GroupAdmin(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module django.contrib.auth.admin , or try the search function .

Example 1
Project: tethys   Author: tethysplatform   File: admin.py    License: BSD 2-Clause "Simplified" License 5 votes vote down vote up
def register_custom_group():
    try:
        class CustomGroup(GroupAdmin):
            form = make_gop_app_access_form()

        admin.site.unregister(Group)
        admin.site.register(Group, CustomGroup)
    except ProgrammingError:
        tethys_log.warning("Unable to register CustomGroup.")