Added (first pass) notes to docs & release notes. Backed out SOUTH_MIGRATION_MODULES setting from rest_framework.settings

This commit is contained in:
Carlton Gibson 2014-06-24 09:02:44 +02:00
parent f34011f801
commit 3f727ce738
3 changed files with 34 additions and 12 deletions

View File

@ -126,7 +126,13 @@ To use the `TokenAuthentication` scheme, include `rest_framework.authtoken` in y
'rest_framework.authtoken' 'rest_framework.authtoken'
) )
Make sure to run `manage.py syncdb` after changing your settings. The `authtoken` database tables are managed by south (see [Schema migrations](#schema-migrations) below).
---
**Note:** Make sure to run `manage.py syncdb` after changing your settings. Both Django native (from v1.7) and South migrations for the `authtoken` database tables are provided. See [Schema migrations](#schema-migrations) below.
---
You'll also need to create tokens for your users. You'll also need to create tokens for your users.
@ -198,7 +204,21 @@ Note that the default `obtain_auth_token` view explicitly uses JSON requests and
#### Schema migrations #### Schema migrations
The `rest_framework.authtoken` app includes a south migration that will create the authtoken table. The `rest_framework.authtoken` app includes both a Django native migration (for Django versions >1.7) and a south migration that will create the authtoken table.
----
**Note** By default both Django (>1.7) and South will look for a module named `migrations`. To avoid a collision here, in order to use South you **must** provide the `SOUTH_MIGRATION_MODULES` option in your `settings.py`:
SOUTH_MIGRATION_MODULES = {
'authtoken': 'rest_framework.authtoken.south_migrations',
}
This tells South to look in the `south_migrations` module for the `authtoken` app.
----
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. 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.

View File

@ -43,6 +43,14 @@ You can determine your currently installed version using `pip freeze`:
### 2.3.x ### 2.3.x
**Date**: April 2014 **Date**: April 2014
* Added compatibility with Django 1.7's native migrations.
**IMPORTANT**: In order to continue to use south with Django <1.7 you **must** provide
the `SOUTH_MIGRATION_MODULES` option in your `settings.py`:
SOUTH_MIGRATION_MODULES = {
'authtoken': 'rest_framework.authtoken.south_migrations',
}
* Fix nested serializers linked through a backward foreign key relation * Fix nested serializers linked through a backward foreign key relation
* Fix bad links for the `BrowsableAPIRenderer` with `YAMLRenderer` * Fix bad links for the `BrowsableAPIRenderer` with `YAMLRenderer`
@ -165,9 +173,9 @@ You can determine your currently installed version using `pip freeze`:
* Added `trailing_slash` option to routers. * Added `trailing_slash` option to routers.
* Include support for `HttpStreamingResponse`. * Include support for `HttpStreamingResponse`.
* Support wider range of default serializer validation when used with custom model fields. * Support wider range of default serializer validation when used with custom model fields.
* UTF-8 Support for browsable API descriptions. * UTF-8 Support for browsable API descriptions.
* OAuth2 provider uses timezone aware datetimes when supported. * OAuth2 provider uses timezone aware datetimes when supported.
* Bugfix: Return error correctly when OAuth non-existent consumer occurs. * Bugfix: Return error correctly when OAuth non-existent consumer occurs.
* Bugfix: Allow `FileUploadParser` to correctly filename if provided as URL kwarg. * Bugfix: Allow `FileUploadParser` to correctly filename if provided as URL kwarg.
* Bugfix: Fix `ScopedRateThrottle`. * Bugfix: Fix `ScopedRateThrottle`.
@ -208,7 +216,7 @@ You can determine your currently installed version using `pip freeze`:
* Added SearchFilter * Added SearchFilter
* Added OrderingFilter * Added OrderingFilter
* Added GenericViewSet * Added GenericViewSet
* Bugfix: Multiple `@action` and `@link` methods now allowed on viewsets. * Bugfix: Multiple `@action` and `@link` methods now allowed on viewsets.
* Bugfix: Fix API Root view issue with DjangoModelPermissions * Bugfix: Fix API Root view issue with DjangoModelPermissions
### 2.3.2 ### 2.3.2
@ -261,7 +269,7 @@ You can determine your currently installed version using `pip freeze`:
* Long HTTP headers in browsable API are broken in multiple lines when possible. * Long HTTP headers in browsable API are broken in multiple lines when possible.
* Bugfix: Fix regression with DjangoFilterBackend not worthing correctly with single object views. * Bugfix: Fix regression with DjangoFilterBackend not worthing correctly with single object views.
* Bugfix: OAuth should fail hard when invalid token used. * Bugfix: OAuth should fail hard when invalid token used.
* Bugfix: Fix serializer potentially returning `None` object for models that define `__bool__` or `__len__`. * Bugfix: Fix serializer potentially returning `None` object for models that define `__bool__` or `__len__`.
### 2.2.5 ### 2.2.5

View File

@ -120,12 +120,6 @@ DEFAULTS = {
# Pending deprecation # Pending deprecation
'FILTER_BACKEND': None, 'FILTER_BACKEND': None,
# 1.7 Migration Compatibility
'SOUTH_MIGRATION_MODULES': {
'authtoken': 'rest_framework.authtoken.south_migrations',
}
} }