From 5e96a1ddf17946595a22083b035f99418dd2cbd7 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 23 Mar 2015 11:34:01 +0000 Subject: Update documentation --- tutorial/5-relationships-and-hyperlinked-apis/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tutorial/5-relationships-and-hyperlinked-apis') diff --git a/tutorial/5-relationships-and-hyperlinked-apis/index.html b/tutorial/5-relationships-and-hyperlinked-apis/index.html index 418c7851..6ac9f9c0 100644 --- a/tutorial/5-relationships-and-hyperlinked-apis/index.html +++ b/tutorial/5-relationships-and-hyperlinked-apis/index.html @@ -473,8 +473,10 @@ class UserSerializer(serializers.HyperlinkedModelSerializer):
'snippet-detail'.'url' fields that by default will refer to '{model_name}-detail', which in this case will be 'snippet-detail' and 'user-detail'.After adding all those names into our URLconf, our final snippets/urls.py file should look something like this:
After adding all those names into our URLconf, our final snippets/urls.py file should look like this:
from django.conf.urls import url, include
+from rest_framework.urlpatterns import format_suffix_patterns
+from snippets import views
# API endpoints
urlpatterns = format_suffix_patterns([
--
cgit v1.2.3