From 987880e13138a93d9cc0e44b7ed30297909f7b03 Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Tue, 27 Jan 2015 23:15:26 +0100 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 0d82b190..39b8dd42 100644 --- a/tutorial/5-relationships-and-hyperlinked-apis/index.html +++ b/tutorial/5-relationships-and-hyperlinked-apis/index.html @@ -482,7 +482,9 @@ class UserSerializer(serializers.HyperlinkedModelSerializer):
'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:
# API endpoints
+from django.conf.urls import url, include
+
+# API endpoints
 urlpatterns = format_suffix_patterns([
     url(r'^$', views.api_root),
     url(r'^snippets/$',
-- 
cgit v1.2.3