Changes between Version 7 and Version 8 of CustomFormFields
- Timestamp:
- Dec 23, 2009, 1:41:08 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CustomFormFields
v7 v8 71 71 except ValueError: 72 72 raise validators.ValidationError, _("Port number must be between 1 and 65355") 73 if proto.lower().strip() not in ['tcp', 'udp']:73 if proto.lower().strip() not in ('tcp', 'udp'): 74 74 raise validators.ValidationError, _("Protocol must be either 'TCP' or 'UDP'") 75 75 … … 99 99 def convert_post_data(self, new_data): 100 100 name = self.get_member_name() 101 if new_data.has_key(self.field_name):101 if self.field_name in new_data: 102 102 d = new_data.getlist(self.field_name) 103 103 try: … … 150 150 except ValueError: 151 151 raise validators.ValidationError, _("Port number must be between 1 and 65355") 152 if proto.lower().strip() not in ['tcp', 'udp']:152 if proto.lower().strip() not in ('tcp', 'udp'): 153 153 raise validators.ValidationError, _("Protocol must be either 'TCP' or 'UDP'") 154 154