mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 04:07:39 +03:00
Fixes #2493
This commit is contained in:
parent
a89e05dc73
commit
aaa1fcd5d1
|
@ -97,7 +97,7 @@ The first thing we need to get started on our Web API is to provide a way of ser
|
||||||
class SnippetSerializer(serializers.Serializer):
|
class SnippetSerializer(serializers.Serializer):
|
||||||
pk = serializers.IntegerField(read_only=True)
|
pk = serializers.IntegerField(read_only=True)
|
||||||
title = serializers.CharField(required=False, allow_blank=True, max_length=100)
|
title = serializers.CharField(required=False, allow_blank=True, max_length=100)
|
||||||
code = serializers.CharField(style={'type': 'textarea'})
|
code = serializers.CharField(style={'base_template': 'textarea.html'})
|
||||||
linenos = serializers.BooleanField(required=False)
|
linenos = serializers.BooleanField(required=False)
|
||||||
language = serializers.ChoiceField(choices=LANGUAGE_CHOICES, default='python')
|
language = serializers.ChoiceField(choices=LANGUAGE_CHOICES, default='python')
|
||||||
style = serializers.ChoiceField(choices=STYLE_CHOICES, default='friendly')
|
style = serializers.ChoiceField(choices=STYLE_CHOICES, default='friendly')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user