from django.contrib import admin
from admin_ordering.admin import OrderableAdmin
from .models import *

# Register your models here.


@admin.register(Post)
class PostModelAdmin(OrderableAdmin, admin.ModelAdmin):
    list_display = ['__str__', 'link', 'published', 'ordering']
    list_editable = ['ordering']
    ordering_field_hide_input = True
    exclude = ['ordering']


@admin.register(GrandPrixW)
class GrandPrixWAdmin(OrderableAdmin, admin.ModelAdmin):
    list_display = ('__str__', 'link', 'published', 'ordering')
    list_editable = ['ordering']
    ordering_field_hide_input = True
    exclude = ['ordering']
    
