Created
May 14, 2011 17:29
-
-
Save Enome/972414 to your computer and use it in GitHub Desktop.
Admin.py example
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 apps.books.models import Book, Genre, Author, Tag | |
class BookAdmin(admin.ModelAdmin): | |
pass | |
class GenreAdmin(admin.ModelAdmin): | |
pass | |
class TagAdmin(admin.ModelAdmin): | |
pass | |
class AuthorAdmin(admin.ModelAdmin): | |
pass | |
admin.site.register(Book, BookAdmin) | |
admin.site.register(Genre, GenreAdmin) | |
admin.site.register(Tag, TagAdmin) | |
admin.site.register(Author, AuthorAdmin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment