from django.contrib import admin
from .models import Images,Comments,Profile
# Register your models here.

class CommentInline(admin.TabularInline):
    model=Comments
    extra=3
    
class ImageInline(admin.ModelAdmin):
    fieldsets=[
        (None,{'fields':['image']}),
        (None,{'fields':['image_name']}),
        (None,{'fields':['image_caption']}),
        (None,{'fields':['likes']}),
    ]
    inlines=[CommentInline]
    
    
admin.site.site_header='InstaPost Admin'
admin.site.site_title='InstaPost Admin Dashboard'

admin.site.register(Images,ImageInline)
admin.site.register(Profile)


[((22, 0, 22, 39), 'django.contrib.admin.site.register', 'admin.site.register', ({(22, 20, 22, 26): 'Images', (22, 27, 22, 38): 'ImageInline'}, {}), '(Images, ImageInline)', False, 'from django.contrib import admin\n'), ((23, 0, 23, 28), 'django.contrib.admin.site.register', 'admin.site.register', ({(23, 20, 23, 27): 'Profile'}, {}), '(Profile)', False, 'from django.contrib import admin\n')]