-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Integrate wizards with app registration #6436
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
Merged
czpython
merged 13 commits into
django-cms:release/4.0.x
from
FidelityInternational:FIL-256-wizard-app-reg
Jul 11, 2018
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
85edda6
WIP: Change wizards to use cms_config.py instead of pool
monikasulik 4a59081
Fix tests
monikasulik 156f07d
Modify get_entries to not use wizard_pool
monikasulik a54a4ee
Backwards compatibility of get_entry
monikasulik 2d28a1b
cms_wizards setting validation
monikasulik 4a47450
Backwards compatibility of wizard pool
monikasulik 56931e8
Clean up
monikasulik 5d4c924
Polishing up after code review
monikasulik f70ed48
WIP: Integration test for backwards compatibility of wizard pool auto…
monikasulik 77d61d0
Display warning (instead of exception) when registering the same wiza…
monikasulik 107ed5b
Integration test for backwards compatibility of registering wizards
monikasulik 97c648a
Ensure backwards compatibility of cms_wizards.py autodiscover
monikasulik 785153c
Restructure backwards compatibility code for pools
monikasulik 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
Display warning (instead of exception) when registering the same wiza…
…rd twice
- Loading branch information
commit 77d61d004964f2c06e11638c7e8d103f47ece868
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
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
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.
should we do an elif checking that the wizard has not been registered already?
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.
So I did this locally and am now struggling with random tests failing. What seems to be happening is:
override_settings
decorator with INSTALLED_APPS and include the cms app on the revised list, which in turn triggers another autodiscover thing because the cms's ready method is getting called twice. And therefore raises an error.I can think of some ways of fixing this, but all these ways seem really hacky and will be really annoying and unobvious for future test writers. Do you have an idea for a nice way of doing this?
Alternatively, because we're using a dict, nothing bad is actually going to happen if a wizard is added to the dict twice (it'll just override the previous wizard), so we could just change this to a
logger.warning
? Really our code can cope with double registration of wizards, it's just that the developer has done something fishy if that's what's happening, so we should warn them.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.
Is the app config instance setup on the first load, persisting through to the second load on the tests that use
override_settings
?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.
@czpython I believe so, yes. I seem to be struggling on a similar issue with the integration test on backwards compatibility (needed for the work on retaining the autodiscover of cms_wizards) as well. I've just pushed that.