from django.contrib import admin
from .models import *


class ScraperAdmin(admin.ModelAdmin):
#    prepopulated_fields = {"slug": ("shortname",)}
    list_display = ("name", "items", "new_items", "last_ran")

class OrganizationAdmin(admin.ModelAdmin):
#    prepopulated_fields = {"slug": ("shortname",)}
    list_display = ( "name", "city",)
    # list_filter = ("promo_type",)

class EventAdmin(admin.ModelAdmin):
#    prepopulated_fields = {"slug": ("shortname",)}
    list_display = ( "show_title", "event_type", "show_date", "calendar")
    list_filter = ("calendar", "venue", "event_type",)

class PromoAdmin(admin.ModelAdmin):
#    prepopulated_fields = {"slug": ("shortname",)}
    list_display = ("title", "organization", "promo_type", "published")
    list_filter = ("promo_type",)


# Register your models here.
admin.site.register(Scraper, ScraperAdmin)
admin.site.register(Event, EventAdmin)
admin.site.register(Organization, OrganizationAdmin)
admin.site.register(Promo, PromoAdmin)
admin.site.register(Calendar)