﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27377	Clarify that prepopulated_fields doesn't work with OneToOneField	Malik A. Rumi	Henry Dang	"I don't know if this should be a bug report or a feature request. 

I know that some variation on this question has been asked and answered many times on Stack Overflow. Usually, however, it is about using a foreign key. This is not my question. ""prepopulated_fields doesn’t accept DateTimeField, ForeignKey, nor ManyToManyField fields."" https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#django.contrib.admin.ModelAdmin.prepopulated_fields  

By implication, the docs are saying OneToOne fields are ok. This makes even more sense where the inherited models are a concrete subclass of a concrete base and we are really talking about a single object. For example, a Place can be a Restaurant, and a Restaurant can have a closed off, separate Bar where kids are not allowed. https://docs.djangoproject.com/en/1.10/topics/db/models/#one-to-one-relationships 

However, admin.py is looking for a string to concatenate, not a filtered queryset leading to a related field or object. Furthermore, it expects that string to match the name of an existing field on the instant model, not some other model, even if they are the same object. How, then, can one use a OneToOne field or model in admin.py? I posted this to SO myself, and got ZERO responses. http://stackoverflow.com/questions/39778945/django-prepopulated-fields-inheritance 

Yes, I know about model-utils and polymorphic. But if I am reading the docs correctly, this should be possible without resort to those tools. Besides, both are aimed primarily at queries, and say nothing directly about this specific issue with prepopulated fields in admin.py.  Please advise. Thanks. "	Cleanup/optimization	closed	Documentation	1.10	Normal	fixed	prepopulated_fields, admin.py		Accepted	1	0	0	0	1	0
