Created Admin

parent 6e30ebba
from django.contrib import admin from django.contrib import admin
from .models import Book, Author
# Register your models here. # Register your models here.
class BooksInLine(admin.TabularInline):
model = Book
extra = 1
class AuthorEntry(admin.ModelAdmin):
inlines = [BooksInLine,]
admin.site.register(Author, AuthorEntry)
admin.site.register(Book)
\ No newline at end of file
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