from django.contrib import admin

from standup.status.models import Project, Team, StandupUser, Status


@admin.register(Project)
class ProjectAdmin(admin.ModelAdmin):
    fields = (('name', 'slug'), 'color', 'repo_url')
    list_display = ['name', 'color']
    list_editable = ['color']
    prepopulated_fields = {'slug': ['name']}
    search_fields = ['name', 'repo_url']


@admin.register(Team)
class TeamAdmin(admin.ModelAdmin):
    fields = ['name', 'slug']
    list_display = ['name', 'slug']
    prepopulated_fields = {'slug': ['name']}


@admin.register(StandupUser)
class StandupUserAdmin(admin.ModelAdmin):
    list_display = ['name', 'slug', 'irc_nick']
    search_fields = ['name', 'slug', 'irc_nick']
    filter_horizontal = ['teams']


@admin.register(Status)
class StatusAdmin(admin.ModelAdmin):
    list_display = ['id', 'user', 'project', 'content']
    search_fields = ['content']
    # FIXME(willkg): We want to make this go away and having it causes the page to load *all* the
    # statuses in the db which is insane.
    exclude = ['reply_to']

@@ -933,12 +933,16 @@
 ake 
-this
+reply_to
  go 
@@ -978,16 +978,22 @@
  page to
+%0A    #
  load *a
@@ -999,22 +999,16 @@
 all* the
-%0A    #
  statuse
@@ -1035,16 +1035,126 @@
  insane.
+ We exclude content_html because%0A    # it's not used plus if we were using it, it'd be generated from content.
 %0A    exc
@@ -1171,10 +1171,26 @@
 eply_to'
+, 'content_html'
 %5D%0A

Exclude content_html from StatusAdmin