-
Notifications
You must be signed in to change notification settings - Fork 173
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
Filter without saving #108
Open
alonraiz
wants to merge
18
commits into
modlinltd:develop
Choose a base branch
from
alonraiz:just-filter-without-save
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
60edde3
filter without creating new object
alonraiz c4f539f
template string removed
alonraiz 31ab25e
Just filter without save (#2)
alonraiz 1541a35
Update CI (#1) (#3)
alonraiz 408cf88
FE bug fixes (#4)
alonraiz 1936671
select2 widgets not initializing (#6)
alonraiz 41d9633
save form data when filtering
alonraiz d4acf38
save form data when filtering
alonraiz 9309aa9
filter without creating new object
alonraiz 3a5feaa
template string removed
alonraiz e8a027f
save form data when filtering
alonraiz 8ba8315
Merge branch 'just-filter-without-save' of https://github.com/alonrai…
alonraiz eff7c15
Merge remote-tracking branch 'upstream/develop' into just-filter-with…
alonraiz b695456
template string removed
alonraiz fb38ffc
Modlinltd master (#8)
alonraiz ee868f5
Merge branch 'modlinltd:master' into master
alonraiz a337ca4
Merge branch 'master' into just-filter-without-save
alonraiz adb40aa
Update test_creation.py
alonraiz 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{# for now - make filter hidden in sidebar #} |
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 |
---|---|---|
|
@@ -127,6 +127,17 @@ def test_create_form_valid(self): | |
|
||
assert list(created_filter.query.children[0]) == self.query | ||
|
||
# just filter | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should go in it's own test, e.g |
||
form_data.pop('_save_goto') | ||
form_data['_just_filter'] = 1 | ||
url = reverse('admin:customers_client_changelist') | ||
res = self.client.post(url, data=form_data) | ||
|
||
assert res.status_code == 302 | ||
assert AdvancedFilter.objects.count() == 2 | ||
url = res['location'] | ||
assert '?_aquery=' in url | ||
|
||
|
||
class AdvancedFilterUsageTest(TestCase): | ||
""" Test filter visibility and actual filtering of a changelist """ | ||
|
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.
How about we add this into it's own method
filter_without_saving
orfilter_ad_hoc
or some other name, and allow it to be called fromadv_filters_handle
if not saving.