Consider following code snipped (I tried to make it very simple just to explain this bug):
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