Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3631630
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:25:19+00:00 2026-05-19T00:25:19+00:00

How do you display forms for the children of a specific model in the

  • 0

How do you display forms for the children of a specific model in the Django Admin Panel?

class Matchup(models.Model):
    name        = models.CharField(max_length=30)
    winner      = models.ForeignKey('players.player',blank=True)        

class Slot(models.Model):
    player  = models.ForeignKey('players.player',blank=True)
    matchup = models.ForeignKey(Matchup)

Each matchup will have two slots – how would I go about displaying forms for both of them in line with the Match.

Basically, I want to have something like this:

Matchup Name:     [         ]
Matchup Winner:   [         ]
--
== Slot 1 ==
|| Slot Player:   [         ]
== Slot 2 ==
|| Slot Player:   [         ]

I realize it may appear that the slot model is useless and should just be replaced by two references to players, but there are various reasons I want to do it this way.

EDIT: removed confusing associations

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:25:20+00:00Added an answer on May 19, 2026 at 12:25 am
    from models import *
    
    class SlotInline(admin.StackedInline):
        model = Slot
    
    class MatchupAdmin(admin.ModelAdmin):
        model = Matchup
        inlines = [SlotInline]
    
    admin.site.register(Matchup, MatchupAdmin)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using C++/CLI, How to display a managed control (eg. System::Windows::Forms::Panel^) on a window created
In Django's ModelAdmin , I need to display forms customized according to the permissions
I have the following button: <input type=button count='<?php echo count($_SESSION['children']);?>' name=children class=add_child value=Add Another
I have a winforms application in which I am using 2 Forms to display
I have 2 forms, 1 is for control and the other is for display.
I'm using a winforms webbrowser control to display some content in a windows forms
I have my own textbox which inherits System.Windows.Forms.TextBox I am trying to display texts
I am working on a simple chat application using a System.Windows.Forms.WebBrowser Control to display
I have a Model Category which has name:string categoryId:integer parent_id:integer the categoryId doesnt matter
I Use Fancybox to display complex forms on an intranet site. The page the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.