Admin

Swingers’ custom admin classes.

Admin

class swingers.admin.admin.RegionAdmin

A ModelAdmin class for the Region and District model types.

class swingers.admin.admin.RelatedFieldAdmin

Enables lookup separators in the admin.list_display.

class SomeAdmin(RelatedFieldAdmin):
    list_display = ['related__model__name', 'related__model']

should work without the usual:

def related__model__name(self, obj):
    return obj.related.model.name
related__model__name.short_description = "<taken from name.title()>"
class swingers.admin.admin.DetailAdmin

A ModelAdmin class that adds a detail view for an object. This includes a customized ChangeList class swingers.admin.views.DetailChangeList.

Django-swingers is a library of common utilities, templates and other django customizations used throughout Department of Parks and Wildlife.

Table Of Contents

Related Topics