Commit 25b508a2 authored by Almira Redoble's avatar Almira Redoble

Created admin panel.

parent f27aac2c
from django.contrib import admin
# Register your models here.
from .models import Author, Books
class BooksInline(admin.TabularInline):
model = Books
class BooksAdmin(admin.ModelAdmin):
model = Books
class AuthorAdmin(admin.ModelAdmin):
model = Author
inlines = [BooksInline, ]
admin.site.register(Books, BooksAdmin)
admin.site.register(Author, AuthorAdmin)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment