From 4cdb6b2959f6d13417c48781d53c4e7e685934e7 Mon Sep 17 00:00:00 2001 From: Stephan Groß Date: Mon, 4 Mar 2013 13:53:39 +0100 Subject: Fix authtoken migration --- docs/api-guide/settings.md | 12 ++++++++++++ docs/topics/release-notes.md | 1 + 2 files changed, 13 insertions(+) (limited to 'docs') diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index e103fbab..0ecb1d2d 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -174,4 +174,16 @@ The name of a parameter in the URL conf that may be used to provide a format suf Default: `'format'` +## REQUIRED_MIGRATIONS + +This is a list of required migrations which are needed by the authtoken migration. + +E.g. + + ( + ('users', '0001_initial'), + ) + +Default: `'()'` + [cite]: http://www.python.org/dev/peps/pep-0020/ diff --git a/docs/topics/release-notes.md b/docs/topics/release-notes.md index 43499c9a..f6ef2c18 100644 --- a/docs/topics/release-notes.md +++ b/docs/topics/release-notes.md @@ -45,6 +45,7 @@ You can determine your currently installed version using `pip freeze`: * Request authentication is no longer lazily evaluated, instead authentication is always run, which results in more consistent, obvious behavior. Eg. Supplying bad auth credentials will now always return an error response, even if no permissions are set on the view. * Bugfix for serializer data being uncacheable with pickle protocol 0. * Bugfixes for model field validation edge-cases. +* Bugfix for authtoken migration while using a custom user model. ### 2.2.1 -- cgit v1.2.3 From d6391359f5cf4be394cf5785edab882f28cb225a Mon Sep 17 00:00:00 2001 From: Stephan Groß Date: Mon, 4 Mar 2013 14:04:03 +0100 Subject: Fix fix migrate authtoken --- docs/api-guide/settings.md | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'docs') diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index 0ecb1d2d..e103fbab 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -174,16 +174,4 @@ The name of a parameter in the URL conf that may be used to provide a format suf Default: `'format'` -## REQUIRED_MIGRATIONS - -This is a list of required migrations which are needed by the authtoken migration. - -E.g. - - ( - ('users', '0001_initial'), - ) - -Default: `'()'` - [cite]: http://www.python.org/dev/peps/pep-0020/ -- cgit v1.2.3 From b4c9b68c965c8e07712bf6d173abe4d1e59f8728 Mon Sep 17 00:00:00 2001 From: Stephan Groß Date: Mon, 4 Mar 2013 14:09:59 +0100 Subject: Add note for using authtoken with custom django user model and south --- docs/api-guide/authentication.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md index fae86386..80d29ff4 100644 --- a/docs/api-guide/authentication.md +++ b/docs/api-guide/authentication.md @@ -169,6 +169,8 @@ The `obtain_auth_token` view will return a JSON response when valid `username` a Note that the default `obtain_auth_token` view explicitly uses JSON requests and responses, rather than using default renderer and parser classes in your settings. If you need a customized version of the `obtain_auth_token` view, you can do so by overriding the `ObtainAuthToken` view class, and using that in your url conf instead. +**Note:** If you are using `rest_framework.authtoken` with a custom Django user model and South. you have to insert a `needed_by = (('authtoken', '0001_initial'),)` to your user migration. + ## SessionAuthentication 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. -- cgit v1.2.3 From 7db2332c4006cd2c79b0ad002bcd9e15f7075ca6 Mon Sep 17 00:00:00 2001 From: Stephan Groß Date: Mon, 4 Mar 2013 14:11:05 +0100 Subject: Update release docs --- docs/topics/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/topics/release-notes.md b/docs/topics/release-notes.md index f6ef2c18..352b1630 100644 --- a/docs/topics/release-notes.md +++ b/docs/topics/release-notes.md @@ -45,7 +45,7 @@ You can determine your currently installed version using `pip freeze`: * Request authentication is no longer lazily evaluated, instead authentication is always run, which results in more consistent, obvious behavior. Eg. Supplying bad auth credentials will now always return an error response, even if no permissions are set on the view. * Bugfix for serializer data being uncacheable with pickle protocol 0. * Bugfixes for model field validation edge-cases. -* Bugfix for authtoken migration while using a custom user model. +* Bugfix for authtoken migration while using a custom user model and south. ### 2.2.1 -- cgit v1.2.3