from django.contrib import admin
from .models import  Book, BookInstance, Student

# Register your models here.

# admin.site.register(Book)
# admin.site.register(BookInstance)

class BookAdmin(admin.ModelAdmin):
    list_display = ('book_name', 'author', 'isbn')
    fields = ['book_name', 'author', 'isbn']

admin.site.register(Book, BookAdmin)

class BookInstanceInline(admin.TabularInline):
    model = BookInstance

@admin.register(BookInstance)
class BookInstanceAdmin(admin.ModelAdmin):
    list_display = ('book', 'issued', 'due_date', 'id', 'borrower')
    fields = ['id', 'book', 'issued', 'due_date', 'borrower']

class StudentAdmin(admin.ModelAdmin):
    list_display = ('first_name', 'last_name', 'mobile', 'address', 'joined_on')
    fields = ['first_name', 'last_name', 'mobile', 'address', 'joined_on']

admin.site.register(Student, StudentAdmin)

6a67a72f355a3b9f8563e2ef09e4812be40c975f
<mask token>


class BookAdmin(admin.ModelAdmin):
    <mask token>
    <mask token>


<mask token>


class BookInstanceInline(admin.TabularInline):
    model = BookInstance


@admin.register(BookInstance)
class BookInstanceAdmin(admin.ModelAdmin):
    list_display = 'book', 'issued', 'due_date', 'id', 'borrower'
    fields = ['id', 'book', 'issued', 'due_date', 'borrower']


class StudentAdmin(admin.ModelAdmin):
    list_display = 'first_name', 'last_name', 'mobile', 'address', 'joined_on'
    fields = ['first_name', 'last_name', 'mobile', 'address', 'joined_on']


<mask token>

<mask token>


class BookAdmin(admin.ModelAdmin):
    list_display = 'book_name', 'author', 'isbn'
    fields = ['book_name', 'author', 'isbn']


<mask token>


class BookInstanceInline(admin.TabularInline):
    model = BookInstance


@admin.register(BookInstance)
class BookInstanceAdmin(admin.ModelAdmin):
    list_display = 'book', 'issued', 'due_date', 'id', 'borrower'
    fields = ['id', 'book', 'issued', 'due_date', 'borrower']


class StudentAdmin(admin.ModelAdmin):
    list_display = 'first_name', 'last_name', 'mobile', 'address', 'joined_on'
    fields = ['first_name', 'last_name', 'mobile', 'address', 'joined_on']


<mask token>

<mask token>


class BookAdmin(admin.ModelAdmin):
    list_display = 'book_name', 'author', 'isbn'
    fields = ['book_name', 'author', 'isbn']


admin.site.register(Book, BookAdmin)


class BookInstanceInline(admin.TabularInline):
    model = BookInstance


@admin.register(BookInstance)
class BookInstanceAdmin(admin.ModelAdmin):
    list_display = 'book', 'issued', 'due_date', 'id', 'borrower'
    fields = ['id', 'book', 'issued', 'due_date', 'borrower']


class StudentAdmin(admin.ModelAdmin):
    list_display = 'first_name', 'last_name', 'mobile', 'address', 'joined_on'
    fields = ['first_name', 'last_name', 'mobile', 'address', 'joined_on']


admin.site.register(Student, StudentAdmin)

from django.contrib import admin
from .models import Book, BookInstance, Student


class BookAdmin(admin.ModelAdmin):
    list_display = 'book_name', 'author', 'isbn'
    fields = ['book_name', 'author', 'isbn']


admin.site.register(Book, BookAdmin)


class BookInstanceInline(admin.TabularInline):
    model = BookInstance


@admin.register(BookInstance)
class BookInstanceAdmin(admin.ModelAdmin):
    list_display = 'book', 'issued', 'due_date', 'id', 'borrower'
    fields = ['id', 'book', 'issued', 'due_date', 'borrower']


class StudentAdmin(admin.ModelAdmin):
    list_display = 'first_name', 'last_name', 'mobile', 'address', 'joined_on'
    fields = ['first_name', 'last_name', 'mobile', 'address', 'joined_on']


admin.site.register(Student, StudentAdmin)

from django.contrib import admin
from .models import  Book, BookInstance, Student

# Register your models here.

# admin.site.register(Book)
# admin.site.register(BookInstance)

class BookAdmin(admin.ModelAdmin):
    list_display = ('book_name', 'author', 'isbn')
    fields = ['book_name', 'author', 'isbn']

admin.site.register(Book, BookAdmin)

class BookInstanceInline(admin.TabularInline):
    model = BookInstance

@admin.register(BookInstance)
class BookInstanceAdmin(admin.ModelAdmin):
    list_display = ('book', 'issued', 'due_date', 'id', 'borrower')
    fields = ['id', 'book', 'issued', 'due_date', 'borrower']

class StudentAdmin(admin.ModelAdmin):
    list_display = ('first_name', 'last_name', 'mobile', 'address', 'joined_on')
    fields = ['first_name', 'last_name', 'mobile', 'address', 'joined_on']

admin.site.register(Student, StudentAdmin)
