Created
April 12, 2016 16:36
-
-
Save devStepsize/4ebb14ae1a424dc053663d24e05b61f0 to your computer and use it in GitHub Desktop.
Template django admin interface. It reads metadata in your models to provide a powerful production-ready interfance that content producers can immediately use to start managing content on your site. Source: https://www.djangoproject.com/start/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from bands.models import Band, Member | |
class MemberAdmin(admin.ModelAdmin): | |
"""Customize the look of the auto-generated admin for the Member model""" | |
list_display = ('name', 'instrument') | |
list_filter = ('band',) | |
admin.site.register(Band) # Use the default options | |
admin.site.register(Member, MemberAdmin) # Use the customized options |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment