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

  • Home
  • SEARCH
  • 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 7187079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:46:01+00:00 2026-05-28T18:46:01+00:00

I have been using django to write a rather complicated object-oriented model for a

  • 0

I have been using django to write a rather complicated object-oriented model for a menu system.

Recently I have considered the idea of allowing the administrator to create a ‘build_menu’ object.

Ideally one would provide a name for input, and once created the menu would have:

  • call django startapp menu
  • copy of views.py, models.py, and admin.py from the menu app, replacing classnames with classnames
  • append to urls.py to include the new areas for ‘menu’
  • append ‘.prefix_menu’ to the INSTALLED_APPS in settings.py
  • python manage.py syncdb
  • pkill python (on Dreamhost so I’d need to restart the process to see new changes on the screen)

Obviously there is no generic implementation that will do this for me, but the bigger question is: Is this possible? Would it be possible to write these commands into a script to do it from the server side, and after creating a new ‘build_menu’ object on the django admin site, have it run that script and then refresh the page when it completes? Or is this something I would be unable to do from the admin site?

  • 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-28T18:46:02+00:00Added an answer on May 28, 2026 at 6:46 pm

    One quick, hacky method to get them to show up separately in the admin would be:

    • Make a a single model with a charfield attribute type_name, as Ned suggested
    • Add type_name to the list_filter attribute of the model admin
    • Override the relevant template to list the unique values of type_name with a link to the appropriate filter page

    That has some fairly obvious problems (e.g. after saving an object it’ll bring you back to the unfiltered edit page), but you could probably override the admin list view and maybe some other admin functions to do what you want nicely — no code altering required.

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

Sidebar

Related Questions

I have been using mostly .values() to speed up my django queries. Recently I
I have been using django ORM, it's nice and very easy, but this time
I have a Django project where I have been logging to a file using
I decided to learn Django Forms. For a while now, I have been using
I have been using django-appengine and am now trying a project with django-nonrel. Before
I am using django-voting package and have been trying to get it's manager get_top()
I have a django project that I have been using for a while, but
I have been using sqlalchemy for a few years now in replacement for Django
I am running cherokee to serve a django app using uwsgi. I have been
I have been using django for a while and I am now converting to

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.