Commit c9309f02 authored by RJC's avatar RJC

added modeladmin for book and author obj

parent a3f4c4ac
......@@ -2,5 +2,15 @@ from django.contrib import admin
from .models import Author, Books
# Register your models here.
class BookAdmin(admin.ModelAdmin):
readonly_fields = ['id']
class AuthorAdmin(admin.ModelAdmin):
readonly_fields = ['id']
admin.site.register(Author)
admin.site.register(Books)
\ No newline at end of file
admin.site.register(Books, BookAdmin)
\ 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