Answers for "django-admin"

3

django-admin

python3 manage.py createsuperuser
Posted by: Guest on April-27-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
-1

what is admin.tabularinline django

from django.db import models

class Author(models.Model):
   name = models.CharField(max_length=100)

class Book(models.Model):
   author = models.ForeignKey(Author, on_delete=models.CASCADE)
   title = models.CharField(max_length=100)
Posted by: Guest on May-12-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language