mirror of
				https://github.com/SectorLabs/django-localized-fields.git
				synced 2025-10-31 02:48:56 +03:00 
			
		
		
		
	Add missing docs to LocalizedField.contribute_to_class
This commit is contained in:
		| @@ -91,9 +91,18 @@ class LocalizedField(HStoreField): | |||||||
|  |  | ||||||
|         super(LocalizedField, self).__init__(*args, **kwargs) |         super(LocalizedField, self).__init__(*args, **kwargs) | ||||||
|  |  | ||||||
|     def contribute_to_class(self, cls, name, **kwargs): |     def contribute_to_class(self, model, name, **kwargs): | ||||||
|         super(LocalizedField, self).contribute_to_class(cls, name, **kwargs) |         """Adds this field to the specifed model. | ||||||
|         setattr(cls, self.name, self.descriptor_class(self)) |  | ||||||
|  |         Arguments: | ||||||
|  |             cls: | ||||||
|  |                 The model to add the field to. | ||||||
|  |  | ||||||
|  |             name: | ||||||
|  |                 The name of the field to add. | ||||||
|  |         """ | ||||||
|  |         super(LocalizedField, self).contribute_to_class(model, name, **kwargs) | ||||||
|  |         setattr(model, self.name, self.descriptor_class(self)) | ||||||
|  |  | ||||||
|     @classmethod |     @classmethod | ||||||
|     def from_db_value(cls, value, *_): |     def from_db_value(cls, value, *_): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user