from django.contrib import admin
from .models import Mosquito, MosqPost


class MosquitoAdmin(admin.ModelAdmin):
    list_display = ('name', 'device_id', 'region')
    list_filter = ('name', 'device_id', 'region')
    ordering = ('name', 'region')


class MosqPostAdmin(admin.ModelAdmin):
    list_display = ('mosq', 'led', 'energy', 'time')
    list_filter = ('mosq', 'time')
    ordering = ['time']


admin.site.register(Mosquito, MosquitoAdmin)
admin.site.register(MosqPost, MosqPostAdmin)
