from django.contrib import admin
from .models import WeatherRecord


@admin.register(WeatherRecord)
class WeatherRecordAdmin(admin.ModelAdmin):
    list_display = ['date', 'temp_mean', 'temp_max', 'temp_min',
                    'sunshine_h', 'precip_mm', 'wind_max', 'pressure_min']
    list_filter = ['date']
    search_fields = ['date']
    ordering = ['-date']
    date_hierarchy = 'date'
