-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
Fixed #18314.request.build_absolute_uri() finally functions correctly #1314
Closed
Conversation
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
Fixed #18872 -- Added prefix to FormMixin
Fixed #20587 -- Made convert_values handle None values
…l-Forms .po file headers. Thanks naktinis for the report and initial patch.
The code examples should now work correctly. The `get_context_data` method in the examples was changed when necessary to adopt a singular style (get context with super(...), add the extra keys to the dict then return it). Thanks to Remco Wendt for the initial report and to Tim Graham for the review.
Thanks to Michal Sládek for the report and initial patch, and to loic84 for the review.
Thanks to Tim Graham for the report and review.
In Django < 1.6, override_settings restores the settings module that was active when the override_settings call was executed, not when it was run. This can make a difference when override_settings is applied to a class, since it's executed when the module is imported, not when the test case is run. In addition, if the settings module for tests is stored alongside the tests themselves, importing the settings module can trigger an import of the tests. Since the settings module isn't fully imported yet, class-level override_settings statements may store a reference to an incorrect settings module. Eventually this will result in a crash during test teardown because the settings module restored by override_settings won't the one that was active during test setup. While Django should prevent this situation in the future by failing loudly in such dubious import sequences, that change won't be backported to 1.5 and 1.4. However, these versions received the "allowed hosts" patch and they're prone to "AttributeError: 'Settings' object has no attribute '_original_allowed_hosts'". To mitigate this regression, this commits stuffs _original_allowed_hosts on a random module instead of the settings module. This problem shouldn't occur in Django 1.6, see #20290, but this patch will be forward-ported for extra safety. Also tweaked backup variable names for consistency. Forward port of 0261922 from stable/1.5.x. Conflicts: django/test/utils.py
This is to allow future compatibility with work that is ongoing in the 2013 GSoC.
… when the path starts with //
Please open a new PR if you can fix the tests, thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://code.djangoproject.com/ticket/18314 In "django/http", request.build_absolute_uri() finally functions correctly when path starts with "//". Thanks SmileyChris and yoyoma for work on the patches. I manually applied the "18314.diff" patch given by SmileyChris. The tests in "tests/http/" failed before the patch was implemented, and then the tests succeeded after the patch was implemented. Please code review and let me know how I can make this PR better.