Skip to content

Commit

Permalink
Merge pull request #1 from tomchristie/master
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
BrickXu committed Nov 25, 2014
2 parents 5cad60d + ecc26f6 commit 7165496
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion docs/tutorial/4-authentication-and-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/6-viewsets-and-routers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
9 changes: 5 additions & 4 deletions rest_framework/templates/rest_framework/login_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit 7165496

Please sign in to comment.