Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored August 05, 2005

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/core/meta/fields.py
4  django/core/meta/fields.py
@@ -532,7 +532,7 @@ def __init__(self, to, to_field=None, rel_name=None, **kwargs):
532 532
             kwargs['verbose_name'] = kwargs.get('verbose_name', to._meta.verbose_name)
533 533
             rel_name = rel_name or to_name
534 534
         kwargs['rel'] = ManyToOne(to, rel_name, to_field,
535  
-            num_in_admin=kwargs.pop('num_in_admin', 0),
  535
+            num_in_admin=kwargs.pop('num_in_admin', 3),
536 536
             min_num_in_admin=kwargs.pop('min_num_in_admin', None),
537 537
             max_num_in_admin=kwargs.pop('max_num_in_admin', None),
538 538
             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):
585 585
         IntegerField.__init__(self, **kwargs)
586 586
 
587 587
 class ManyToOne:
588  
-    def __init__(self, to, name, field_name, num_in_admin=0, min_num_in_admin=None,
  588
+    def __init__(self, to, name, field_name, num_in_admin=3, min_num_in_admin=None,
589 589
         max_num_in_admin=None, num_extra_on_change=1, edit_inline=False, edit_inline_type=STACKED,
590 590
         related_name=None, limit_choices_to=None, lookup_overrides=None, raw_id_admin=False):
591 591
         try:

0 notes on commit 0b9330b

Please sign in to comment.
Something went wrong with that request. Please try again.