mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-12-04 16:54:02 +03:00
Fix Documentation
Use "url" instead of "account_url" in Serializers' guide example.
This commit is contained in:
parent
365d409adb
commit
d9abd93eeb
|
|
@ -708,7 +708,7 @@ You can override a URL field view name and lookup field by using either, or both
|
|||
class AccountSerializer(serializers.HyperlinkedModelSerializer):
|
||||
class Meta:
|
||||
model = Account
|
||||
fields = ['account_url', 'account_name', 'users', 'created']
|
||||
fields = ['url', 'account_name', 'users', 'created']
|
||||
extra_kwargs = {
|
||||
'url': {'view_name': 'accounts', 'lookup_field': 'account_name'},
|
||||
'users': {'lookup_field': 'username'}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user