mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Fixed #1006 -- Fixed error when using ChangeManipulator in a model with raw_id_admin on ForeignKey. Thanks, Gustavo Picon
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1577 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		
							
								
								
									
										1
									
								
								AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								AUTHORS
									
									
									
									
									
								
							| @@ -48,6 +48,7 @@ answer newbie questions, and generally made Django that much better: | |||||||
|     Clint Ecker |     Clint Ecker | ||||||
|     Baishampayan Ghose |     Baishampayan Ghose | ||||||
|     Espen Grindhaug <http://grindhaug.org/> |     Espen Grindhaug <http://grindhaug.org/> | ||||||
|  |     Gustavo Picon | ||||||
|     Brant Harris |     Brant Harris | ||||||
|     Ian Holsman <http://feh.holsman.net/> |     Ian Holsman <http://feh.holsman.net/> | ||||||
|     Kieran Holland <http://www.kieranholland.com> |     Kieran Holland <http://www.kieranholland.com> | ||||||
|   | |||||||
| @@ -325,11 +325,13 @@ class FormField: | |||||||
|  |  | ||||||
| class TextField(FormField): | class TextField(FormField): | ||||||
|     input_type = "text" |     input_type = "text" | ||||||
|     def __init__(self, field_name, length=30, maxlength=None, is_required=False, validator_list=[]): |     def __init__(self, field_name, length=30, maxlength=None, is_required=False, validator_list=[], member_name=None): | ||||||
|         self.field_name = field_name |         self.field_name = field_name | ||||||
|         self.length, self.maxlength = length, maxlength |         self.length, self.maxlength = length, maxlength | ||||||
|         self.is_required = is_required |         self.is_required = is_required | ||||||
|         self.validator_list = [self.isValidLength, self.hasNoNewlines] + validator_list |         self.validator_list = [self.isValidLength, self.hasNoNewlines] + validator_list | ||||||
|  |         if member_name != None: | ||||||
|  |             self.member_name = member_name | ||||||
|  |  | ||||||
|     def isValidLength(self, data, form): |     def isValidLength(self, data, form): | ||||||
|         if data and self.maxlength and len(data.decode(DEFAULT_CHARSET)) > self.maxlength: |         if data and self.maxlength and len(data.decode(DEFAULT_CHARSET)) > self.maxlength: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user