diff options
| author | BrickXu | 2014-11-25 17:40:32 +0800 |
|---|---|---|
| committer | BrickXu | 2014-11-25 17:40:32 +0800 |
| commit | 71654967325ff5c587ce37031109152e741786ee (patch) | |
| tree | 14577a6ba5cbe90036c46e648bde222e5c5015a0 | |
| parent | 5cad60dc4f1bce535497151a2f4f3ece08389f31 (diff) | |
| parent | ecc26f6cb1e8b1f1a4cd72cf980b750aeed65cf7 (diff) | |
| download | django-rest-framework-71654967325ff5c587ce37031109152e741786ee.tar.bz2 | |
Merge pull request #1 from tomchristie/master
Merge upstream
| -rw-r--r-- | docs/tutorial/4-authentication-and-permissions.md | 4 | ||||
| -rw-r--r-- | docs/tutorial/6-viewsets-and-routers.md | 2 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/login_base.html | 9 |
3 files changed, 9 insertions, 6 deletions
diff --git a/docs/tutorial/4-authentication-and-permissions.md b/docs/tutorial/4-authentication-and-permissions.md index adab1b55..4e4edeea 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. diff --git a/docs/tutorial/6-viewsets-and-routers.md b/docs/tutorial/6-viewsets-and-routers.md index cf37a260..3fad509a 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({ diff --git a/rest_framework/templates/rest_framework/login_base.html b/rest_framework/templates/rest_framework/login_base.html index 8ab682ac..e050cbdc 100644 --- a/rest_framework/templates/rest_framework/login_base.html +++ b/rest_framework/templates/rest_framework/login_base.html @@ -22,7 +22,7 @@ <div id="div_id_username" class="clearfix control-group {% if form.username.errors %}error{% endif %}"> <div class="controls"> - <Label class="span4">Username:</label> + <label class="span4">Username:</label> <input style="height: 25px" type="text" name="username" maxlength="100" autocapitalize="off" autocorrect="off" class="span12 textinput textInput" @@ -36,9 +36,10 @@ </div> </div> <div id="div_id_password" - class="clearfix control-group {% if form.password.errors %}error{% endif %}"> + class="clearfix control-group {% if form.password.errors %}error{% endif %}" + style="margin-top: 10px"> <div class="controls"> - <Label class="span4">Password:</label> + <label class="span4">Password:</label> <input style="height: 25px" type="password" name="password" maxlength="100" autocapitalize="off" autocorrect="off" class="span12 textinput textInput" id="id_password" required> @@ -55,7 +56,7 @@ <div class="well well-small text-error" style="border: none">{{ error }}</div> {% endfor %} {% endif %} - <div class="form-actions-no-box"> + <div class="form-actions-no-box" style="margin-top: 20px"> <input type="submit" name="submit" value="Log in" class="btn btn-primary" id="submit-id-submit"> </div> </form> |
