admin page를 커스터마이징해서 원하는 정보들을 전부 볼 수 있다.
admin.py
from django.contrib import admin
from .models import Flight, Airport, Passenger
# Register your models here.
class FlightAdmin(admin.ModelAdmin):
list_display = ("id", "origin", "destination", "duration")
class PassengerAdmin(admin.ModelAdmin):
filter_horizontal = ("flights",)
admin.site.register(Airport)
admin.site.register(Flight, FlightAdmin)
admin.site.register(Passenger, PassengerAdmin)
https://youtu.be/YzP164YANAU
https://developer.mozilla.org/ko/docs/Learn/Server-side/Django