Created
August 16, 2012 09:13
-
-
Save lqez/3368666 to your computer and use it in GitHub Desktop.
SAMPLE : webtoon admin.py
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 webtoon.models import * | |
from django.contrib import admin | |
class AuthorAdmin(admin.ModelAdmin): | |
list_display = ('name', 'desc') | |
admin.site.register(Author, AuthorAdmin) | |
class ComicAdmin(admin.ModelAdmin): | |
list_display = ('title', 'author', 'desc') | |
admin.site.register(Comic, ComicAdmin) | |
class EpisodeAdmin(admin.ModelAdmin): | |
list_display = ('comic', 'title', 'pub_date') | |
admin.site.register(Episode, EpisodeAdmin) | |
class CommentAdmin(admin.ModelAdmin): | |
list_display = ('episode', 'user', 'msg', 'written_date') | |
admin.site.register(Comment, CommentAdmin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment