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 3958926
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:40:02+00:00 2026-05-20T02:40:02+00:00

See below for models.py/admin.py When I try to change or add a FashionMaleModel, the

  • 0

See below for models.py/admin.py

When I try to change or add a FashionMaleModel, the inlines don’t appear, but they do in FashionFemaleModel. If I change the order in which the admin sites are registered, putting Male below Female, then the inlines only show up in FashionMaleModel, and not FashionFemaleModel.

Why are my inlines only showing up in one or the other?

Thanks!


I’ve truncated these models because there’s a lot. Also, FashionObject/FashionPage are base classes I’ve created as part of a custom CMS with id, name, publish_date, etc.

models.py:

class FashionModelRole(models.Model):
    title = models.CharField(max_length=255,)

class FashionModelContributor(models.Model):
    role = models.ForeignKey(FashionModelRole)
    person = models.ForeignKey(FashionModelPerson, related_name='contributions')

class FashionModel(FashionObject):
    gender = models.CharField(max_length=1,choices=(('F','Female'),('M','Male')), 
editable=False)

class FashionExperience(models.Model):
    model = models.ForeignKey(FashionModel, related_name = 'experience')
    division = models.ForeignKey(FashionDivision, related_name = 'levels')
    experience = models.CharField(max_length=1,choices=(('5','Professional'),('4','Advanced'),('3','Intermediate'),('2','Developing'),('1','Recreational'),))

class FashionMaleModel(FashionModel):
    jacket_size = MeasurementField(max_length=6, blank=True, null=True)

    def __init__(self, *args, **kwargs):
        super(FashionMaleModel, self).__init__(*args, **kwargs)
        self.gender = 'M'

class FashionFemaleModel(FashionModel):
    dress_size = MeasurementField(max_length=6, blank=True, null=True)

    def __init__(self, *args, **kwargs):
        super(FashionFemaleModel, self).__init__(*args, **kwargs)
        self.gender = 'F'

class FashionModelPhoto(models.Model):
    model = models.ForeignKey(FashionModel, related_name = 'photos')
    contributors = models.ManyToManyField(FashionModelContributor, null=True, blank=True)

admin.py:

class FashionExperienceInline(admin.TabularInline):
    model = FashionExperience

class FashionModelPhotoInline(admin.TabularInline):
    model = FashionModelPhoto

class FashionDivisionAdmin(FashionPageAdmin):
    def __init__(self, *args, **kwargs):
        super(FashionDivisionAdmin, self).__init__(*args, **kwargs)

class FashionModelAdmin(FashionObjectAdmin):
    def __init__(self, *args, **kwargs):
        super(FashionModelAdmin, self).__init__(*args, **kwargs)
        self.inlines += (
            FashionModelPhotoInline,
            FashionExperienceInline,
            )

class FashionMaleModelAdmin(FashionModelAdmin):
    def __init__(self, *args, **kwargs):
        super(FashionMaleModelAdmin, self).__init__(*args, **kwargs)

class FashionFemaleModelAdmin(FashionModelAdmin):
    def __init__(self, *args, **kwargs):
        super(FashionFemaleModelAdmin, self).__init__(*args, **kwargs)

class FashionModelPersonAdmin(admin.ModelAdmin):
    def __init__(self, *args, **kwargs):
        super(FashionModelPersonAdmin, self).__init__(*args, **kwargs)

class FashionModelRoleAdmin(admin.ModelAdmin):
    def __init__(self, *args, **kwargs):
        super(FashionModelRoleAdmin, self).__init__(*args, **kwargs)        

class FashionModelContributorAdmin(admin.ModelAdmin):
    def __init__(self, *args, **kwargs):
        super(FashionModelContributorAdmin, self).__init__(*args, **kwargs)

admin.site.register(FashionMaleModel, FashionMaleModelAdmin)
admin.site.register(FashionFemaleModel, FashionFemaleModelAdmin)
admin.site.register(FashionDivision, FashionDivisionAdmin)
admin.site.register(FashionModelPerson, FashionModelPersonAdmin)
admin.site.register(FashionModelRole, FashionModelRoleAdmin)
admin.site.register(FashionModelContributor, FashionModelContributorAdmin)
  • 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-20T02:40:02+00:00Added an answer on May 20, 2026 at 2:40 am

    I took out the __init__ functions from the FashionMaleModelAdmin and FashionFemaleModelAdmin classes, then I defined the inlines separately inside each one:

    inlines = (FashionModelPhotoInline, FashionExperienceInline)
    

    Seems to work. Thanks to everyone who took a look at this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this edmx model (see below) and I would like to add an
Please see below: I tried using Absolute layout, but that's deprecated. I appreciate your
Thanks in advance...see below the code.. i have 2 models, category and product my
I have Chart and Module models (see code below). Each chart belongs to a
I'm developing a tool for creating/editing Django models, see https://github.com/timothyclemans/django-admin-models-editor . What is the
Please see below code: thrust::device_vector<int>::iterator whereToBegin = copyListOfNgramCounteachdoc.begin(); end = thrust::unique_by_key(end.first, end.first + numUniqueNgrams,end.second);
UPDATE see below I am not sure how to populate a list or vector
Is there a best (see below) way to append two byte arrays in C#?
I have a list (see below) contained in a window. The window's DataContext has
As you can see below, I have Parallel.For loop. If run the program while

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.