Django

Code

Ticket #2638: 2638.diff

File 2638.diff, 1.8 kB (added by heckj@mac.com, 4 years ago)

attaching patch (from trunk) for a suggested resolution. Includes update to documentation

  • django/db/models/fields/generic.py

    old new  
    252252        self.filter_interface = None 
    253253        self.limit_choices_to = limit_choices_to or {} 
    254254        self.edit_inline = False 
    255         self.raw_id_admin = Fals
     255        self.raw_id_admin = Tru
    256256        self.symmetrical = symmetrical 
    257257        self.multiple = True 
    258258        assert not (self.raw_id_admin and self.filter_interface), \ 
  • docs/model-api.txt

    old new  
    767767    ``num_in_admin``         The default number of inline objects to display 
    768768                             on the object page at the add stage. 
    769769 
    770     ``raw_id_admin``         Only display a field for the integer to be entered 
    771                              instead of a drop-down menu. This is useful when 
    772                              related to an object type that will have too many 
    773                              rows to make a select box practical. 
     770    ``raw_id_admin``         When set to False, display a drop-down menu instead  
     771                             of an integer only field. This is useful when  
     772                             related to an object type that has few enough rows 
     773                             to make a select box practical. When ``raw_id_admin`` 
     774                             is to False, any use of an to save will cause that 
     775                             AddManipulator to load all the potential relations 
     776                             to this object. 
    774777 
    775778                             Not used with ``edit_inline``. 
    776779