diff options
| author | Tom Christie | 2013-01-30 13:41:56 +0000 |
|---|---|---|
| committer | Tom Christie | 2013-01-30 13:41:56 +0000 |
| commit | be6df3ae3ce18bf4b55ae065ebd34198885e48df (patch) | |
| tree | 3a96bb6a5075584add7e28c6d8d7f251ad785b4e /docs/tutorial | |
| parent | 9a4d01d687d57601d37f9a930d37039cb9f6a6f2 (diff) | |
| parent | 8021bb5d5089955b171173e60dcc0968e13d29ea (diff) | |
| download | django-rest-framework-be6df3ae3ce18bf4b55ae065ebd34198885e48df.tar.bz2 | |
Merge branch 'master' into many-fields
Conflicts:
rest_framework/relations.py
Diffstat (limited to 'docs/tutorial')
| -rw-r--r-- | docs/tutorial/1-serialization.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md index f5ff167f..5f292211 100644 --- a/docs/tutorial/1-serialization.md +++ b/docs/tutorial/1-serialization.md @@ -4,7 +4,7 @@ This tutorial will cover creating a simple pastebin code highlighting Web API. Along the way it will introduce the various components that make up REST framework, and give you a comprehensive understanding of how everything fits together. -The tutorial is fairly in-depth, so you should probably get a cookie and a cup of your favorite brew before getting started.<!-- If you just want a quick overview, you should head over to the [quickstart] documentation instead. --> +The tutorial is fairly in-depth, so you should probably get a cookie and a cup of your favorite brew before getting started. If you just want a quick overview, you should head over to the [quickstart] documentation instead. --- @@ -130,11 +130,11 @@ The first thing we need to get started on our Web API is provide a way of serial """ if instance: # Update existing instance - instance.title = attrs['title'] - instance.code = attrs['code'] - instance.linenos = attrs['linenos'] - instance.language = attrs['language'] - instance.style = attrs['style'] + instance.title = attrs.get('title', instance.title) + instance.code = attrs.get('code', instance.code) + instance.linenos = attrs.get('linenos', instance.linenos) + instance.language = attrs.get('language', instance.language) + instance.style = attrs.get('style', instance.style) return instance # Create new instance |
