diff --git a/404.html b/404.html index e0924db0d..bb2ea4c06 100644 --- a/404.html +++ b/404.html @@ -277,6 +277,10 @@ 3.1 Announcement +
We suggest adding your package to the REST Framework grid on Django Packages.
Create a Pull Request or Issue on GitHub, and we'll add a link to it from the main REST framework documentation. You can add your package under Third party packages of the API Guide section that best applies, like Authentication or Permissions. You can also link your package under the [Third Party Resources][third-party-resources] section.
+Create a Pull Request or Issue on GitHub, and we'll add a link to it from the main REST framework documentation. You can add your package under Third party packages of the API Guide section that best applies, like Authentication or Permissions. You can also link your package under the Third Party Resources section.
You can also let others know about your package through the discussion group.
ImageField
that makes it easy to serve images in multiple sizes/renditions from a single field. For DRF-specific implementation docs, click here.The first thing we need to get started on our Web API is to provide a way of serializing and deserializing the snippet instances into representations such as json
. We can do this by declaring serializers that work very similar to Django's forms. Create a file in the snippets
directory named serializers.py
and add the following.
from django.forms import widgets
-from rest_framework import serializers
+from rest_framework import serializers
from snippets.models import Snippet, LANGUAGE_CHOICES, STYLE_CHOICES
@@ -652,7 +655,7 @@ urlpatterns = [
Validating models...
0 errors found
-Django version 1.4.3, using settings 'tutorial.settings'
+Django version 1.8.3, using settings 'tutorial.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
diff --git a/tutorial/2-requests-and-responses/index.html b/tutorial/2-requests-and-responses/index.html
index 0c7f0e0b5..5f3ff0451 100644
--- a/tutorial/2-requests-and-responses/index.html
+++ b/tutorial/2-requests-and-responses/index.html
@@ -277,6 +277,10 @@
3.1 Announcement
+
+ 3.2 Announcement
+
+
Kickstarter Announcement
@@ -308,7 +312,7 @@
def snippet_detail(request, pk, format=None):
Now update the urls.py
file slightly, to append a set of format_suffix_patterns
in addition to the existing URLs.
from django.conf.urls import patterns, url
+from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from snippets import views
diff --git a/tutorial/3-class-based-views/index.html b/tutorial/3-class-based-views/index.html
index ca6ebb431..4c192e860 100644
--- a/tutorial/3-class-based-views/index.html
+++ b/tutorial/3-class-based-views/index.html
@@ -277,6 +277,10 @@
3.1 Announcement
+
+ 3.2 Announcement
+
+
Kickstarter Announcement
@@ -308,7 +312,7 @@
Rather than write multiple views we're grouping together all the common behavior into classes called ViewSets
.
We can easily break these down into individual views if we need to, but using viewsets keeps the view logic nicely organized as well as being very concise.
-For trivial cases you can simply set a model
attribute on the ViewSet
class and the serializer and queryset will be automatically generated for you. Setting the queryset
and/or serializer_class
attributes gives you more explicit control of the API behaviour, and is the recommended style for most applications.
Okay, now let's wire up the API URLs. On to tutorial/urls.py
...
from django.conf.urls import url, include