Skip to content

Commit a9bbb50

Browse files
xordoquytomchristie
authored andcommitted
Remove references to South as we don't need it any longer. (#4085)
* Remove references to South as we don't need it any longer. * Add a note about auth_token including Django migrations.
1 parent 88c80fe commit a9bbb50

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

docs/api-guide/authentication.md

+1-36
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,10 @@ To use the `TokenAuthentication` scheme you'll need to [configure the authentica
128128

129129
---
130130

131-
**Note:** Make sure to run `manage.py syncdb` after changing your settings. The `rest_framework.authtoken` app provides both Django (from v1.7) and South database migrations. See [Schema migrations](#schema-migrations) below.
131+
**Note:** Make sure to run `manage.py migrate` after changing your settings. The `rest_framework.authtoken` app provides Django database migrations.
132132

133133
---
134134

135-
136135
You'll also need to create tokens for your users.
137136

138137
from rest_framework.authtoken.models import Token
@@ -217,38 +216,6 @@ It is also possible to create Tokens manually through admin interface. In case y
217216
TokenAdmin.raw_id_fields = ('user',)
218217

219218

220-
#### Schema migrations
221-
222-
The `rest_framework.authtoken` app includes both Django native migrations (for Django versions >1.7) and South migrations (for Django versions <1.7) that will create the authtoken table.
223-
224-
----
225-
226-
**Note**: From REST Framework v2.4.0 using South with Django <1.7 requires upgrading South v1.0+
227-
228-
----
229-
230-
231-
If you're using a [custom user model][custom-user-model] you'll need to make sure that any initial migration that creates the user table runs before the authtoken table is created.
232-
233-
You can do so by inserting a `needed_by` attribute in your user migration:
234-
235-
class Migration:
236-
237-
needed_by = (
238-
('authtoken', '0001_initial'),
239-
)
240-
241-
def forwards(self):
242-
...
243-
244-
For more details, see the [south documentation on dependencies][south-dependencies].
245-
246-
Also note that if you're using a `post_save` signal to create tokens, then the first time you create the database tables, you'll need to ensure any migrations are run prior to creating any superusers. For example:
247-
248-
python manage.py syncdb --noinput # Won't create a superuser just yet, due to `--noinput`.
249-
python manage.py migrate
250-
python manage.py createsuperuser
251-
252219
## SessionAuthentication
253220

254221
This authentication scheme uses Django's default session backend for authentication. Session authentication is appropriate for AJAX clients that are running in the same session context as your website.
@@ -392,8 +359,6 @@ HTTP Signature (currently a [IETF draft][http-signature-ietf-draft]) provides a
392359
[throttling]: throttling.md
393360
[csrf-ajax]: https://docs.djangoproject.com/en/dev/ref/csrf/#ajax
394361
[mod_wsgi_official]: http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPassAuthorization
395-
[custom-user-model]: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#specifying-a-custom-user-model
396-
[south-dependencies]: http://south.readthedocs.org/en/latest/dependencies.html
397362
[django-oauth-toolkit-getting-started]: https://django-oauth-toolkit.readthedocs.org/en/latest/rest-framework/getting_started.html
398363
[django-rest-framework-oauth]: http://jpadilla.github.io/django-rest-framework-oauth/
399364
[django-rest-framework-oauth-authentication]: http://jpadilla.github.io/django-rest-framework-oauth/authentication/

0 commit comments

Comments
 (0)