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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:54:20+00:00 2026-05-11T03:54:20+00:00

I am working through the examples in a Django book that I have, but

  • 0

I am working through the examples in a Django book that I have, but the book was written for 0.96 and I am using 1.0.2, yeah, I know, not the best idea. But reading Django’s ‘porting your apps from 0.96 to 1.0’ doc has cleared up most of the differences for me. Until I get to the point where I need to implement inline editing of a second model on the admin page.

I am using a custom keyword search model to allow you to search pages made using Django’s Flatpages app. Below is the model:

class SearchKeyword(models.Model):

    keyword = models.CharField(max_length=50, blank=True)     page = models.ForeignKey(FlatPage)      def __unicode__(self):         return self.keyword 

What should my admin.py look like to set up a StackedInline for SearchKeyword that shows up on the Flatpages admin page?

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T03:54:20+00:00Added an answer on May 11, 2026 at 3:54 am

    You can do something like this:

    class SearchKeywordInline(admin.StackedInline):     model = SearchKeyword     extra = 3  class FlatPageAdmin(admin.ModelAdmin):     inlines = [SearchKeywordInline]  # unregister the FlatPage model from the admin site so I can # register it again with the inline stuff (Thanks Carl & Jason) admin.site.unregister(FlatPage) admin.site.register(FlatPage, FlatPageAdmin) 

    More info in the official Django docs

    Update: Fixed the code to suit your requirements.

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

Sidebar

Related Questions

I'm currently working through an assignment that deals with Big-O and running times. I
I'm working through Practical Web 2.0 Appications currently and have hit a bit of
I just got done working through the Django tutorials for the second time, and
For a Django application that I'm working on, I wanted to allow group membership
I'm using django, and have a static webpage with a GET form, and about
I have an ugly loop that is operating as a band-aid in Django that
All of the examples I've seen of using registerContentObserver() do so through a ContentProvider
I have a game using OpenGL. I've built off of the examples, for the
I've been studying from the book Pro Android 2. I'm working through a Service
I've been working through Practical Common Lisp and as an exercise decided to write

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.