from django.contrib import admin
from models import *
#from markitup.widgets import MarkItUpWidget
from adminsortable.admin import SortableAdmin, SortableTabularInline

class BasePageAdmin(SortableAdmin): 
#    formfield_overrides = {models.TextField: {'widget': MarkItUpWidget({'data-classes': 'Align Left|imgLeftAlign,Align Right|imgRightAlign,Align Centre|imgCentreAlign'})}}
    prepopulated_fields = {'slug': ('title',)}

# from forms import ArticleForm


#class CourseInline(SortableTabularInline):
#    model = Course
#    

##class PageImageInline(SortableTabularInline):
##    model = PageImage


#class CoursePageAdmin(BasePageAdmin):
#    inlines = [CourseInline]
##class ItemsPageAdmin(BasePageAdmin):
##    inlines = [PageItemInline]


#class ImagesPageAdmin(BasePageAdmin):
#    inlines = [PageImageInline]
##  search_fields = ('title', 'synopsis',),
##  list_display = ('title', 'date',)


#admin.site.register(ItemsPage, ItemsPageAdmin)
#admin.site.register(ImagesPage, ImagesPageAdmin)
admin.site.register(ContentPage, BasePageAdmin)
#admin.site.register(CoursePage, CoursePageAdmin)
