from django.contrib import admin
# from django.contrib.auth.models import User
from models import *

class ProjectImageInline(admin.TabularInline):
    model = ProjectImage
    extra = 20

class ProjectAdmin(admin.ModelAdmin):
    prepopulated_fields = {'slug': ('title',)}
    inlines = [ProjectImageInline]

class SliderImageAdmin(admin.ModelAdmin):
    list_display = ('__unicode__', 'order',)
    list_editable = ('order',)

admin.site.register(Project, ProjectAdmin)
admin.site.register(SliderImage, SliderImageAdmin)
admin.site.register(Link)
admin.site.register(Noteworthy)
