From 790a651893c4bc6e68bc4d724d5df4ea3f883ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gil=20Gon=C3=A7alves?= Date: Mon, 24 Nov 2014 08:51:08 +0000 Subject: [PATCH 1/4] Fixed database update instructions --- docs/tutorial/4-authentication-and-permissions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/4-authentication-and-permissions.md b/docs/tutorial/4-authentication-and-permissions.md index adab1b55ab..4e4edeeacd 100644 --- a/docs/tutorial/4-authentication-and-permissions.md +++ b/docs/tutorial/4-authentication-and-permissions.md @@ -44,7 +44,9 @@ When that's all done we'll need to update our database tables. Normally we'd create a database migration in order to do that, but for the purposes of this tutorial, let's just delete the database and start again. rm tmp.db - python manage.py syncdb + rm -r snippets/migrations + python manage.py makemigrations snippets + python manage.py migrate You might also want to create a few different users, to use for testing the API. The quickest way to do this will be with the `createsuperuser` command. From 918b9cc6a605ee4701d77f73e93a62f04c2345b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gil=20Gon=C3=A7alves?= Date: Mon, 24 Nov 2014 08:54:07 +0000 Subject: [PATCH 2/4] Added missing import in tutorial snippet --- docs/tutorial/6-viewsets-and-routers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/6-viewsets-and-routers.md b/docs/tutorial/6-viewsets-and-routers.md index cf37a26016..3fad509a1d 100644 --- a/docs/tutorial/6-viewsets-and-routers.md +++ b/docs/tutorial/6-viewsets-and-routers.md @@ -60,7 +60,7 @@ To see what's going on under the hood let's first explicitly create a set of vie In the `urls.py` file we bind our `ViewSet` classes into a set of concrete views. - from snippets.views import SnippetViewSet, UserViewSet + from snippets.views import SnippetViewSet, UserViewSet, api_root from rest_framework import renderers snippet_list = SnippetViewSet.as_view({ From bdacb6624484209fb008293a9dc40c06a439ef71 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Tue, 25 Nov 2014 08:59:45 +0000 Subject: [PATCH 3/4] Lowercase HTML label tag. Refs #2121. --- rest_framework/templates/rest_framework/login_base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework/templates/rest_framework/login_base.html b/rest_framework/templates/rest_framework/login_base.html index 8ab682ac8b..c688cc28ec 100644 --- a/rest_framework/templates/rest_framework/login_base.html +++ b/rest_framework/templates/rest_framework/login_base.html @@ -22,7 +22,7 @@
- +
- + From ecc26f6cb1e8b1f1a4cd72cf980b750aeed65cf7 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Tue, 25 Nov 2014 09:07:25 +0000 Subject: [PATCH 4/4] Style tweaks to login template. --- rest_framework/templates/rest_framework/login_base.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rest_framework/templates/rest_framework/login_base.html b/rest_framework/templates/rest_framework/login_base.html index c688cc28ec..e050cbdc4b 100644 --- a/rest_framework/templates/rest_framework/login_base.html +++ b/rest_framework/templates/rest_framework/login_base.html @@ -36,7 +36,8 @@
+ class="clearfix control-group {% if form.password.errors %}error{% endif %}" + style="margin-top: 10px">
{{ error }}
{% endfor %} {% endif %} -
+