Django Admin Create Form Inline OneToOne
问题 I have the following model: from django.db import models class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) last_password_reset = models.DateTimeField(auto_now_add=True) needs_password_reset = models.BooleanField(default=True) image_url = models.URLField(max_length=500, default=None, null=True, blank=True) I am trying to inline this into the admin. I have the following: from django import forms from django.contrib.auth.models import User from django