I have a model Student:
from django.db import models
from django.contrib import admin
class Student(models.Model):
name = models.CharField(max_length=30, default='')
lastname = models.CharField(max_length=30, default='')
grade= models.CharField(max_length=8, default='')
class StudentAdmin(admin.ModelAdmin):
list_display= ('name','lastname','grade')
from django.contrib import admin
from .models import *
admin.site.register(Student, StudentAdmin)
Imagine, that I have an additional model Person ( with name and surname fields). My situation is just an example.
I want to create a button in the Django admin (it's very important to implement this in Django admin page), that creates many Student objects at once (name and lastname we take from Person, with empty grade field, which we can fill in the future).