mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
return typo back for new pr, update docs
This commit is contained in:
parent
b19865f88d
commit
5342f22009
|
@ -187,7 +187,7 @@ This renderer is suitable for CRUD-style web APIs that should also present a use
|
||||||
|
|
||||||
Note that views that have nested or list serializers for their input won't work well with the `AdminRenderer`, as the HTML forms are unable to properly support them.
|
Note that views that have nested or list serializers for their input won't work well with the `AdminRenderer`, as the HTML forms are unable to properly support them.
|
||||||
|
|
||||||
**Note**: To get proper links to detail page in `ListCreateAPIView` or `ListAPIView` you should implement `url` field in serializer which return correct link. For example here we use models `get_absolute_url` method:
|
**Note**: In ModelSerializer to get proper links to detail page in `ListCreateAPIView` or `ListAPIView` you should implement `url` field in serializer which return correct link. For example here we use models `get_absolute_url` method:
|
||||||
|
|
||||||
class AccountSerializer(serializers.ModelSerializer):
|
class AccountSerializer(serializers.ModelSerializer):
|
||||||
url = serializers.CharField(source='get_absolute_url', read_only=True)
|
url = serializers.CharField(source='get_absolute_url', read_only=True)
|
||||||
|
|
|
@ -219,7 +219,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
<script src="{% static "rest_framework/js/jquery-1.11.3.min.js" %}"></script>
|
<script src="{% static "rest_framework/js/jquery-1.11.3-min.js" %}"></script>
|
||||||
<script src="{% static "rest_framework/js/ajax-form.js" %}"></script>
|
<script src="{% static "rest_framework/js/ajax-form.js" %}"></script>
|
||||||
<script src="{% static "rest_framework/js/csrf.js" %}"></script>
|
<script src="{% static "rest_framework/js/csrf.js" %}"></script>
|
||||||
<script src="{% static "rest_framework/js/bootstrap.min.js" %}"></script>
|
<script src="{% static "rest_framework/js/bootstrap.min.js" %}"></script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user