﻿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
3662	OneToOne edit_inline - can not add new object in Django admin	alex@…	nobody	"Consider following code snipped (I tried to make it very simple just to explain this bug):
{{{
#!python
from django.db import models
from django.contrib.sites.models import Site


# Create your models here.

class Article(models.Model):
    title = models.CharField(maxlength=50)
    description = models.TextField()
    class Admin:
        pass
    
class CustomArticle(models.Model):
    fti_contents_list = models.TextField(null=True, blank=True)
    layout = models.CharField(maxlength=1,core=True)
    sites = models.ManyToManyField(Site,core=True)
    article = models.OneToOneField(Article,edit_inline=True)
}}}

Here I use OneToOne field to extend standard Article application with custom data I need to use with particular
customer.

The problem:

When I add new product in /admin it fails with error:

  File ""/usr/lib/python2.4/site-packages/django/db/models/related.py"", line 71,
in get_list
    if self.field.rel.min_num_in_admin:

AttributeError: 'OneToOneRel' object has no attribute 'min_num_in_admin'


The solution: see attached patch"		closed	Contrib apps	dev		duplicate	OneToOne, edit_inline		Ready for checkin	1	0	0	0	0	0
