-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All the changes were made in a way that doesn't break the compatibility of older Django versions. Following changes were made to ensure that all tests pass for Django 1.11: - _set_choices method was copied directly to StateEnumField from Django's ChoiceField. Using another classes setter method broke the reference to the instance. Since the method is copied, there should be no functionality changes. - Django's method render_to_response doesn't exist in version 1.11, so it was changed to render. Render is available in the older versions of Django [1], and should have the same functionality. Also, slight change had to be done to the testcase 'test_view_zipped_big_html_context' to account for this new method. - Template loading has a different configuration in the newer versions of Django, so dual code path for old and new styles were created. 'APP_DIRS' was added because Django uses a default template for its logout page. - HttpRequest.REQUEST was removed in the newer Django versions [2], so it was replaced by searching POST followed by GET, as specified in the documentation. - 'permanent' parameter is now explicitly set in the 'RedirectView.as_view' method because the default value changes in Django 1.9 [3]. - Testcases 'test_krb5login' and 'test_krb5login_redirect_to' now accept both absolute and relative urls in the 'Location' of the redirect response. This is because higher versions of Django return relative addresses. It's acceptable by the RFC standard [4]. - The 'TestFixturesJSONField' is skipped Django 1.9+. This is because the 'syncdb' command was removed in Django 1.9 [5], so testing the automatic fixture loading doesn't make sense. [1] https://docs.djangoproject.com/en/1.8/topics/http/shortcuts/#render [2] https://docs.djangoproject.com/en/1.8/ref/request-response/#django.http.HttpRequest.REQUEST [3] https://docs.djangoproject.com/en/1.8/ref/class-based-views/base/#django.views.generic.base.RedirectView.permanent [4] https://tools.ietf.org/html/rfc7231#section-7.1.2 [5] https://docs.djangoproject.com/en/2.2/releases/1.9/#features-removed-in-1-9
- Loading branch information
Showing
9 changed files
with
74 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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 @@ | ||
Django==1.11.29 |
This file contains 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 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 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 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 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 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 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 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