From 0b9330b08584b283ddff342807aa65c1bd1adc45 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 5 Aug 2005 15:05:16 +0000 Subject: [PATCH] Changed default ManyToOne num_in_admin from 0 to 3, to help avoid confusion when people forget to set num_in_admin git-svn-id: http://code.djangoproject.com/svn/django/trunk@409 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/meta/fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/core/meta/fields.py b/django/core/meta/fields.py index 51769eaad9..26691db057 100644 --- a/django/core/meta/fields.py +++ b/django/core/meta/fields.py @@ -532,7 +532,7 @@ class ForeignKey(Field): kwargs['verbose_name'] = kwargs.get('verbose_name', to._meta.verbose_name) rel_name = rel_name or to_name kwargs['rel'] = ManyToOne(to, rel_name, to_field, - num_in_admin=kwargs.pop('num_in_admin', 0), + num_in_admin=kwargs.pop('num_in_admin', 3), min_num_in_admin=kwargs.pop('min_num_in_admin', None), max_num_in_admin=kwargs.pop('max_num_in_admin', None), num_extra_on_change=kwargs.pop('num_extra_on_change', 1), @@ -585,7 +585,7 @@ class OneToOneField(IntegerField): IntegerField.__init__(self, **kwargs) class ManyToOne: - def __init__(self, to, name, field_name, num_in_admin=0, min_num_in_admin=None, + def __init__(self, to, name, field_name, num_in_admin=3, min_num_in_admin=None, max_num_in_admin=None, num_extra_on_change=1, edit_inline=False, edit_inline_type=STACKED, related_name=None, limit_choices_to=None, lookup_overrides=None, raw_id_admin=False): try: