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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:42:44+00:00 2026-05-27T15:42:44+00:00

So I am using Djangos builtin comments app (django.contrib.comments) for my blog application. I

  • 0

So I am using Djangos builtin comments app (django.contrib.comments) for my blog application. I made several changes to the forms display, etc. (as described in the documentation). One last thing that bothers me is that the Comments model is in it’s own category in the admin, like this:

MyApp
—Model1
—Modle2

Comments
—Comments

I want it to be like this since the comments are tied to the MyApp models.

MyApp
—Model1
—Modle2
—Comments

I tried to achieve this by adding this line of code to MyApps admin.py (overwriting the Comment class)

class MyAppComment(Comment):

    class Meta(Comment.Meta):
       app_label = 'myapp'

admin.site.unregister(Comment)
admin.site.register(MyAppComment, CommentsAdmin)

And this works (and the Comments model shows up under MyApps) but now the links are wrong…the model points to:

http://www.mysite.com/admin/myapp/myappcomment/

which outputs an error:

no such table: myapp_myappcomment

instead of:

http://www.mysite.com/admin/comments/comment/

This is because the admin forms it’s urls according to app names and model names…how could I just change the position of the Comments model in the admin but leave the urls as they are?

There must be some way to do it?

  • 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-27T15:42:44+00:00Added an answer on May 27, 2026 at 3:42 pm

    You haven’t ‘overwritten’ the Comment class — by subclassing it, you’ve actually created a child model using multi table inheritance. This is why another table needs to be created.

    You could create a proxy model that inherits from the Comment class, then no additional tables need to be created.

    class MyAppComment(Comment):
    
        class Meta(Comment.Meta):
            proxy = True
    
    admin.site.unregister(Comment)
    admin.site.register(MyAppComment, CommentsAdmin)
    

    You shouldn’t need to set app_label if MyAppComment is defined in the myapp app – it will be set automatically.

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

Sidebar

Related Questions

Using django comments framework http://docs.djangoproject.com/en/dev/ref/contrib/comments/ Not sure is there option, to make all comments
I'm using Django to write a blog app, and I'm trying to implement a
Im building a customized comments app for django, using django comments itself. Ive followed
I am using djangos built in comments framework presented in this example: https://docs.djangoproject.com/en/1.3/ref/contrib/comments/example/ And
I'm using Django and Python 2.6, and I want to grow my application using
I'm using django's built-in contrib.auth module and have setup a foreign key relationship to
I've been using the built-in Django comments system which has been working great. On
Could you please help. I am using the django-amf-gateway application ( http://bitbucket.org/wolever/django-amf-gateway ). I
I am using Django 1.3 with built-in static app. My static folder structure is
Currently, this is how I do my login: (r'^login/?$','django.contrib.auth.views.login',{'template_name':'login.html'}), I'm using Django's built in

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.