-
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
base: develop
Are you sure you want to change the base?
Conversation
* filter without creating new object
* Fixed select2 widgets not initializing * fixed bad placement of initialize_select2 call * Changes URL declaration to avoid deprecated pattern This commit changes the way the URLs are declared to avoid RemovedInDjango110Warning messages. The old way, using django.conf.urls.patterns(), is deprecated and will be removed in Django 1.10
…z/django-advanced-filters into just-filter-without-save
Here is an overview of what got changed by this pull request: Complexity increasing per file
==============================
- advanced_filters/admin.py 2
See the complete overview on Codacy |
Any update on this pull request? |
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.
The tests have seemed to vanish since last I saw this feature PR... would be great to have them back
advanced_filters/tests/test_admin.py
Outdated
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
This should go in it's own test, e.g test_create_form_valid_just_filter
and I would rename test_create_form_valid_save_goto
b64_query = query_serializer.dumps(search_query) | ||
url = "{path}?_aquery={query}"\ | ||
.format(path=request.path, query=b64_query) | ||
return HttpResponseRedirect(url) |
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
or filter_ad_hoc
or some other name, and allow it to be called from adv_filters_handle
if not saving.
|
||
data['form-TOTAL_FORMS'] += 1 | ||
|
||
return data, False |
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.
The above means to initialize the forms when querying without saving? If so, perhaps we can use AdvancedFilterForm.initialize_form
to make this more cleaner? Or is it impossible?
When would this be included in a new version? |
There are a couple of comments to address, I'd appreciate any help from contributors as I don't use on the project these days. |
* update README remove confusion from the installation instruction * test: refactor unittest test cases to pytest * chore: replace deprecated assertEquals * chore: replace deprecated logger.warn with warning * style: correct small code style bugs * chore: bump test dependencies * use soft version for coveralls to support python 2.7 * use pycodestyle instead of older pep8 * bump to latest versions of factory-boy and pytest-django * Update CI (#1) * fixup! test: refactor unittest test cases to pytest * fix: update requirements for new test deps matrix * use tox-travis to keep the travis and tox requirements fairly clean * drop versions <3.5 and add released 3.8 * use travis python config and specify pypy3.6 * allow any version of coveralls (easier support for python 2.7) * add up to django 3.0 version according to official dep matrix: Refs: - https://www.djangoproject.com/download/#supported-versions - https://docs.djangoproject.com/en/dev/faq/install/ * Django 3.0 fix modlinltd#110 * fix: switch deprecated force_text to force_str * fix: avoid installing newer braces due to hard requirement of Django 1.11, it's incompatible with our wish to still support django versions 1.9 and 1.10 * fixup! test: refactor unittest test cases to pytest * chore: update python and add Django classifiers * docs: update dependencies stated in the README + update link to vtiger ref * test: add a failing test_choices_has_null required setting a string field to nullable in the Client test model + test that datetime field choices are being excluded * fix: allow choices sort on None fields ; Conflicts: ; advanced_filters/views.py * add release workflow * test: test the CleanWhiteSpacesMixin helper * chore: update changelog and bump version to 1.2.0 * docs: fix typo and clarify title Switching to using the python publish github action which uses twine to push source and wheel to pypi whenever a release is created in GitHub * fix: correct travis.yml deprecated/dupe keywords * Update django-braces * import FieldDoesNotExist from django.core.exceptions * fix: update test matrix to include Django 3.1 Ref: https://docs.djangoproject.com/en/3.1/faq/install/ * chore(setup.py): add Django 3.1 to classifiers + sort imports * Add Turkish translation * Update Admin to show model * Add support for python 3.9 and django 3.1 * chore: update changelog and bump version to 1.3.0 Co-authored-by: Pavel Savchenko <[email protected]> Co-authored-by: Arpit <[email protected]> Co-authored-by: Petr Dlouhý <[email protected]> Co-authored-by: Hugo Maingonnat <[email protected]> Co-authored-by: João Batista <[email protected]> Co-authored-by: predatell <[email protected]> Co-authored-by: Özcan YARIMDÜNYA <[email protected]> Co-authored-by: Thu Trang Pham <[email protected]>
Is this going to get merged anytime soon ? |
Fixes #67
Fixes #81