# -*- coding: utf-8 -*- """ Copyright (c) 2015-2016 by Martin Bley (martin@mb-oss.de) This file is part of TipPy. TipPy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. TipPy 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 General Public License for more details. You should have received a copy of the GNU General Public License along with TipPy. If not, see . """ from tipp.models import * from django.contrib import admin class PostAdmin(admin.ModelAdmin): # fields display on change list list_display = ['content'] # fields to filter the change list with list_filter = ['published', 'created'] # fields to search in change list search_fields = ['content'] # enable the date drill down on change list date_hierarchy = 'created' # enable the save buttons on top on change form save_on_top = True admin.site.register(Team) admin.site.register(Match) admin.site.register(Tipp) admin.site.register(Mandant) admin.site.register(Score) admin.site.register(RelUserMandant) admin.site.register(Competition) admin.site.register(Post, PostAdmin) admin.site.register(RelPostMandant)