-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Allow use of native migrations in 1.7 #1653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
3fcc012
Remove deprecated code
tomchristie 379ad8a
pending deprecations -> deprecated
tomchristie 9e4e2c6
Merge branch 'master' into 2.4.0
tomchristie d72603b
Add support for collection routes to SimpleRouter
aburgel 5b11e23
Add docs for collection routes
aburgel 57cf8b5
Rework extra routes doc for better readability
aburgel 8d521c0
Revert route name change and add key to Route object to identify diff…
aburgel f022743
Rename router collection test case
aburgel e14cbaf
Changed collection_* decorators to list_*
aburgel ca7ba07
Introduce DynamicDetailRoute and DynamicListRoute to distinguish betw…
aburgel eaae8fb
Combined link_* and action_* decorators into detail_route and list_ro…
aburgel c607414
Merge
tomchristie 4292cc1
Docs tweaking
tomchristie 28e44ef
Merge branch 'master' into 2.4.0
tomchristie 8acee2e
Commenting link/action decorators as pending deprecation
tomchristie db25aaf
Merge branch 'static-routes' into 0.4.0
tomchristie 815ef50
If page size query param <= 0, just use default page size.
tomchristie 44ceef8
Updating 2.4.0 release notes
tomchristie 16ffded
Merge master
tomchristie f631f55
Tweak comment
tomchristie bf07b8e
Better docs for customizing dynamic routes. Refs #908
tomchristie 9a5b2ee
Merge master
tomchristie 21cd638
Merge master
tomchristie e441f85
Drop 1.3 support
tomchristie 1bd8fe4
Whitespace fix
tomchristie ab4be47
Fixed code example.
thedrow 3604616
Merge pull request #1148 from thedrow/patch-1
tomchristie 9ab0759
Add tests to pass for get_ident method in BaseThrottle class.
89f26c5
Add get_ident method to pass new tests.
100a933
Add documentation to explain what effect these changes have.
196c595
Fix typo
887da7f
Add missing tick marks
23db6c9
PEP8 Compliance
d6d4621
Merge pull request #1273 from kahnjw/add_get_ident_method_to_base_thr…
tomchristie 83da494
Allow NUM_PROXIES=0 and include more docs
tomchristie ed931b9
Further docs tweaks
tomchristie 9c41c00
Merge branch 'master' into 2.4.0
tomchristie 83b31e7
Merge branch 'patch-1' of git://github.com/bennbollay/django-rest-fra…
tomchristie 5268642
Merge branch 'bennbollay-patch-1' into 2.4.0
tomchristie a1d7aa8
Allow viewset to specify lookup value regex for routing
3cd15fb
Router: Do not automatically adjust lookup_regex when trailing_slash …
8993815
Fix a typo
46f5c62
Regression test for #1330 (Coerce None to '')
yprez e88e3c6
Possible fix for #1330
yprez 6e622d6
CharField - add allow_null argument
yprez e1bbe9d
Set `allow_none = True` for CharFields with null=True
yprez 0fd0454
Test for setting allow_none=True for nullable CharFields
yprez cd9a419
Check the modelfield's class instead
yprez 07cff7b
Merge pull request #1348 from yprez/none-to-empty-string_2.4
tomchristie a90796c
Track changes that need noting in 2.4 announcement
tomchristie 4ab9784
Merge pull request #1333 from bodylabs/2.4.0+lookup_regex
tomchristie 2911cd6
Minor tweaks to 'lookup_value_regex' work
tomchristie 971578c
Support for running the test suite with py.test
pelme d08536a
Merge remote-tracking branch 'origin/master' into 2.4.0
xordoquy 1797a74
Merge remote-tracking branch 'pelme/pytest' into feature/pytest
xordoquy f22ed49
Upgraded to pytest-django 2.6.1
xordoquy c5f68fb
Fixed the issue with django-filters / django 1.7 / pytest
xordoquy 56b4390
Merge remote-tracking branch 'origin/master' into 2.4.0
xordoquy 2aca69a
Merge remote-tracking branch 'reference/master' into feature/pytest
xordoquy cd93cd1
Use url functions from Django itself.
xordoquy 7475fce
Added missing field for the tests.
xordoquy 38362bb
Fixed new default for many
xordoquy c9e6f31
Fixed new default for many
xordoquy 7b4463f
Merge remote-tracking branch 'reference/2.4.0' into feature/pytest
xordoquy eb89ed0
Added missing staticfiles app
xordoquy e5441d8
Use urls functions from django instead of compat.
xordoquy 15c2c58
Updated the release-notes.
xordoquy 2489e38
Merge remote-tracking branch 'origin/master' into 2.4.0
xordoquy f34011f
Allow use of native migrations in 1.7
3f727ce
Added (first pass) notes to docs & release notes. Backed out `SOUTH_M…
d98245a
Merge branch '2.4.0' of github.com:tomchristie/django-rest-framework …
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
def pytest_configure(): | ||
from django.conf import settings | ||
|
||
settings.configure( | ||
DEBUG_PROPAGATE_EXCEPTIONS=True, | ||
DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': ':memory:'}}, | ||
SECRET_KEY='not very secret in tests', | ||
USE_I18N=True, | ||
USE_L10N=True, | ||
STATIC_URL='/static/', | ||
ROOT_URLCONF='tests.urls', | ||
TEMPLATE_LOADERS=( | ||
'django.template.loaders.filesystem.Loader', | ||
'django.template.loaders.app_directories.Loader', | ||
), | ||
MIDDLEWARE_CLASSES=( | ||
'django.middleware.common.CommonMiddleware', | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
'django.middleware.csrf.CsrfViewMiddleware', | ||
'django.contrib.auth.middleware.AuthenticationMiddleware', | ||
'django.contrib.messages.middleware.MessageMiddleware', | ||
), | ||
INSTALLED_APPS=( | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.sites', | ||
'django.contrib.messages', | ||
'django.contrib.staticfiles', | ||
|
||
'rest_framework', | ||
'rest_framework.authtoken', | ||
'tests', | ||
'tests.accounts', | ||
'tests.records', | ||
'tests.users', | ||
), | ||
PASSWORD_HASHERS=( | ||
'django.contrib.auth.hashers.SHA1PasswordHasher', | ||
'django.contrib.auth.hashers.PBKDF2PasswordHasher', | ||
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher', | ||
'django.contrib.auth.hashers.BCryptPasswordHasher', | ||
'django.contrib.auth.hashers.MD5PasswordHasher', | ||
'django.contrib.auth.hashers.CryptPasswordHasher', | ||
), | ||
) | ||
|
||
try: | ||
import oauth_provider | ||
import oauth2 | ||
except ImportError: | ||
pass | ||
else: | ||
settings.INSTALLED_APPS += ( | ||
'oauth_provider', | ||
) | ||
|
||
try: | ||
import provider | ||
except ImportError: | ||
pass | ||
else: | ||
settings.INSTALLED_APPS += ( | ||
'provider', | ||
'provider.oauth2', | ||
) | ||
|
||
# guardian is optional | ||
try: | ||
import guardian | ||
except ImportError: | ||
pass | ||
else: | ||
settings.ANONYMOUS_USER_ID = -1 | ||
settings.AUTHENTICATION_BACKENDS = ( | ||
'django.contrib.auth.backends.ModelBackend', # default | ||
'guardian.backends.ObjectPermissionBackend', | ||
) | ||
settings.INSTALLED_APPS += ( | ||
'guardian', | ||
) | ||
|
||
try: | ||
import django | ||
django.setup() | ||
except AttributeError: | ||
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without thinking about it, I'm not sure what needs to be said in this section.
Topics are:
post_save
creation of tokens — I'd guess this remains unchanged but need to think it through.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grumble, grumble... :) Django uses
depenencies
rather thanneeded_by
but looks okay other than that.https://docs.djangoproject.com/en/1.7/topics/migrations/#migration-files
I'll edit later on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will change anything for those two points. We are just using an alternative location for south's modules.
However I don't know the minimum south version that will support that configuration option.