old_contents: from django.contrib import admin
  
  from models import Ticket
  
  
  admin.site.register(Ticket)
  
new_contents: from django.contrib import admin
  
  from models import Ticket, TicketComment
  
  
  class TicketCommentInline(admin.StackedInline):
      model = TicketComment
      extra = 1
  
  
  class TicketAdmin(admin.ModelAdmin):
      model = Ticket
      inlines = [TicketCommentInline,]
  
  
  admin.site.register(Ticket, TicketAdmin)
  
subject: add ticket comments as inline to ticket admin