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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:19:29+00:00 2026-06-17T18:19:29+00:00

When I use django admin , I can get Groups , Users management entrance

  • 0

enter image description here

When I use django admin, I can get Groups, Users management entrance on the dashboard? How can I get Permission table management entrance as pictures shows above?
I am using django 1.4 . thx for ur time.

EDITED:

from django.contrib import admin
from django.contrib.auth.models import Permission, ContentType

class PermissionAdmin(admin.ModelAdmin):

    fieldsets = [  
        (None,          {'fields': ['name','codename']}),  

    ]  
    list_display = ('name', 'codename')      

class ContentTypeAdmin(admin.ModelAdmin):

    fieldsets = [  
        (None,          {'fields': ['app_label','model']}),  
        ('More info',   {'fields': ['name','codename'], 'classes': ['collapse']}),  

    ]  
    list_display = ('app_label', 'model')         

admin.site.register(Permission, PermissionAdmin)
admin.site.register(ContentType, ContentTypeAdmin)

After edited, I got.

django.core.exceptions.ImproperlyConfigured: 'ContentTypeAdmin.fieldsets[1][2]['fields']' refers to field 'codename' that is missing from the form.

ContentType could onetomany to Permission. How to deal with to these two model in admin?
It works fine before I add:

('More info',   {'fields': ['name','codename'], 'classes': ['collapse']}),  

EDIT2:
enter image description here

  • 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-06-17T18:19:30+00:00Added an answer on June 17, 2026 at 6:19 pm

    I’m not sure how you imagined the ui to behave or look but you can do this:

    from django.contrib.auth.models import Permission
    
    class PermissionAdmin(admin.ModelAdmin):
        model = Permission
        fields = ['name']
    
    admin.site.register(Permission, PermissionAdmin)
    

    Perhaps you can pick it up from there and tweak it as you wish.

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

Sidebar

Related Questions

The Django admin site makes use of a really cool widget: How can I
I use django admin for my users to add their Model objects, as you
The default widget for ManyToManyFields in django-admin is difficult to use. I can set
I'm going to use 'prepopulated_fields' at Django admin to get a YouTube embed code
I want to use the Django admin interface for a very simple web application
I've notice django admin UI does not allow use name with characters that are
Reading about Django, I saw this: http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#ref-contrib-admin - the fancy simple to use admin
I use the django admin for updating various data on the MySQL database. I
I can succesfully save a file via Django admin in one of my models
I have a couple special use cases for Django admin, and I'm curious about

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.