old_contents: from django.contrib import admin
  
  from teamlogic import models
  
  
  class PlayerAdmin(admin.ModelAdmin):
      date_hierarchy = 'birth'
      list_display = ('__unicode__', 'vk_link', 'birth')
      list_editable = ('vk_link',)
      list_filter = ('history', 'basePosition')
      search_fields = ['lastName']
  
  
  class TeamAdmin(admin.ModelAdmin):
      list_display = ('name', 'foundation', 'vk_link', 'captain', 'home')
      list_editable = ('vk_link', 'captain', 'home')
  
  
  class TeamInLeagueAdmin(admin.ModelAdmin):
      list_display = ('team', 'league', 'goal_s', 'goal_p', 'match_v',
                      'match_n', 'match_p', 'penalty', 'get_points')
      list_editable = ('penalty',)
      list_filter = ('league',)
  
  
  class MatchInLeagueAdmin(admin.ModelAdmin):
      list_display = ('home', 'away', 'home_goal', 'away_goal', 'home_goal_first',
                      'away_goal_first', 'league', 'tour', 'hasResult', 'register')
      list_editable = ('hasResult',)
      list_filter = ('league', 'tour')
  
  
  class LeagueAdmin(admin.ModelAdmin):
      list_display = ('name', 'begin_date', 'end_date')
      fields = ('name', 'begin_date', 'end_date', 'image')
  
  
  
  admin.site.register(models.Player, PlayerAdmin)
  admin.site.register(models.Team, TeamAdmin)
  admin.site.register(models.RecOfTeam)
  admin.site.register(models.Stadium)
  admin.site.register(models.Match)
  admin.site.register(models.Goal)
  admin.site.register(models.Tournament, LeagueAdmin)
  admin.site.register(models.TeamInLeague, TeamInLeagueAdmin)
  admin.site.register(models.MatchInLeague, MatchInLeagueAdmin)
  
  admin.sites.AdminSite.index_template = 'admin/index.html'
  
new_contents: from django.contrib import admin
  
  from teamlogic import models
  
  
  @admin.register(models.Player)
  class PlayerAdmin(admin.ModelAdmin):
      date_hierarchy = 'birth'
      list_display = ('__unicode__', 'vk_link', 'birth')
      list_editable = ('vk_link',)
      list_filter = ('history', 'basePosition')
      search_fields = ['lastName']
  
  
  @admin.register(models.Team)
  class TeamAdmin(admin.ModelAdmin):
      list_display = ('name', 'foundation', 'vk_link', 'captain', 'home')
      list_editable = ('vk_link', 'captain', 'home')
  
  
  @admin.register(models.TeamInLeague)
  class TeamInLeagueAdmin(admin.ModelAdmin):
      list_display = ('team', 'league', 'goal_s', 'goal_p', 'match_v',
                      'match_n', 'match_p', 'penalty', 'get_points')
      list_editable = ('penalty',)
      list_filter = ('league',)
  
  
  @admin.register(models.MatchInLeague)
  class MatchInLeagueAdmin(admin.ModelAdmin):
      list_display = ('home', 'away', 'home_goal', 'away_goal',
                      'home_goal_first', 'away_goal_first',
                      'league', 'tour', 'hasResult', 'register')
  
      list_editable = ('hasResult',)
      list_filter = ('league', 'tour')
  
  
  @admin.register(models.Tournament)
  class LeagueAdmin(admin.ModelAdmin):
      list_display = ('name', 'begin_date', 'end_date')
      fields = ('name', 'begin_date', 'end_date', 'image')
  
  
  admin.site.register(models.RecOfTeam)
  admin.site.register(models.Stadium)
  admin.site.register(models.Match)
  admin.site.register(models.Goal)
  
  admin.sites.AdminSite.index_template = 'admin/index.html'
  
subject: Use admin.register decorator for admin models