Answers for "admin in django"

3

django-admin

python3 manage.py createsuperuser
Posted by: Guest on April-27-2020
0

show post id on django admin interface

class BookAdmin(admin.ModelAdmin):
    readonly_fields = ('id',)

admin.site.register(Book, BookAdmin)
Posted by: Guest on April-17-2020
-1

what is admin.tabularinline django

from django.contrib import admin

class BookInline(admin.TabularInline):
    model = Book

class AuthorAdmin(admin.ModelAdmin):
    inlines = [
        BookInline,
    ]
Posted by: Guest on May-12-2020

Python Answers by Framework

Browse Popular Code Answers by Language