49 lines
1.7 KiB
Python
49 lines
1.7 KiB
Python
# Episodes.Community - Community-Driven TV Show Episode Link Sharing Site
|
|
# Copyright (C) 2017 Evert "Diamond" Prants <evert@lunasqu.ee>, Taizo "Tsa6" Simpson <taizo@tsa6.net>
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
from django.contrib import admin
|
|
from django.contrib.auth.admin import UserAdmin
|
|
from .models import *
|
|
from .forms import SpecialUserChangeForm
|
|
|
|
from guardian.admin import GuardedModelAdmin
|
|
|
|
class SpecialUserAdmin(UserAdmin):
|
|
form = SpecialUserChangeForm
|
|
|
|
fieldsets = UserAdmin.fieldsets + (
|
|
(None, {'fields': ('display_name',)}),
|
|
)
|
|
|
|
class ShowAdmin(GuardedModelAdmin):
|
|
pass
|
|
|
|
# Register your models here.
|
|
admin.site.register(Show, ShowAdmin)
|
|
admin.site.register(User, SpecialUserAdmin)
|
|
admin.site.register(Ban)
|
|
admin.site.register(Report)
|
|
admin.site.register(ShowSubmission)
|
|
admin.site.register(Season)
|
|
admin.site.register(Episode)
|
|
admin.site.register(Submission)
|
|
admin.site.register(SubmissionVote)
|
|
admin.site.register(Favorite)
|
|
admin.site.register(Watch)
|
|
admin.site.register(DiscussionBoard)
|
|
admin.site.register(DiscussionReply)
|
|
admin.site.register(DiscussionVote)
|