Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed default ManyToOne num_in_admin from 0 to 3, to help avoid con…

…fusion when people forget to set num_in_admin

git-svn-id: http://code.djangoproject.com/svn/django/trunk@409 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0b9330b08584b283ddff342807aa65c1bd1adc45 1 parent 432e190
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/meta/fields.py
View
4 django/core/meta/fields.py
@@ -532,7 +532,7 @@ def __init__(self, to, to_field=None, rel_name=None, **kwargs):
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 @@ def __init__(self, to, to_field=None, rel_name=None, **kwargs):
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:
Please sign in to comment.
Something went wrong with that request. Please try again.