mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-31 16:07:38 +03:00 
			
		
		
		
	Document lookup_field in release notes
This commit is contained in:
		
							parent
							
								
									35f99cddc4
								
							
						
					
					
						commit
						ddbbe7844b
					
				|  | @ -117,6 +117,18 @@ And would have the following entry in the urlconf: | |||
| 
 | ||||
| Usage of the old-style attributes continues to be supported, but will raise a `PendingDeprecationWarning`. | ||||
| 
 | ||||
| ## Simpler URL lookups | ||||
| 
 | ||||
| The `lookup_field` argument also replaces the `pk_url_kwarg`, `slug_url_kwarg`, and `slug_field` arguments when creating `HyperlinkedRelatedField` instances. | ||||
| 
 | ||||
| For example, you might have a field that references it's relationship by a hyperlink based on a slug field: | ||||
| 
 | ||||
|         account = HyperlinkedRelatedField(read_only=True, | ||||
|                                           lookup_field='slug', | ||||
|                                           view_name='account-detail') | ||||
| 
 | ||||
| Usage of the old-style attributes continues to be supported, but will raise a `PendingDeprecationWarning`. | ||||
| 
 | ||||
| ## DecimalField | ||||
| 
 | ||||
| 2.3 introduces a `DecimalField` serializer field, which returns `Decimal` instances. | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user