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
Added generic class based search views #1130
Conversation
The only test that's failing looks to be from a configuration change from elasticsearch which is causing all test runs to fail:
The failure doesn't have anything to do with this PR change. I'm assuming the elasticsearch change is referring to:
|
Added a fix for the elasticsearch tests which got some of the previously broken tests to successfully run again. |
# this changed in change 1.7 to throw an error instead of | ||
# returning None when the model isn't found. So catch the | ||
# lookup error and keep self._model == None. | ||
pass |
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.
get_model raises LookupError instead of returning None when no model is found.
https://docs.djangoproject.com/en/1.7/releases/1.7/#introspecting-applications
This is also the first part of the fix to #1069.
The only tests now failing I would question if they should be failing. It has to do with django 1.7 and finding models. The remaining django 1.7 errors are as follows:
The tests are all passing, but since there are items added to the error log, the tests fail. The first one:
Is simply because the item was never saved to the database. It makes sense that this would show up in the logs so it could be cleaned up. The 2nd, 3rd and 4th errors are:
which also make sense to see in the logs since
In that case, I would expect to see an error in the error log as well. So all these errors seem legit so why do we want this test to fail in these cases? |
@acdha, @lehins, @bennylope any feedback? |
I think the Django 1.7 errors should be deferred to another ticket - we already have one related to the various failures which are caused by the mock models. The last time @bigjust and I were talking about that, I was strongly in favor of discarding our legacy mock models entirely in favor normal models on the test app since the performance wins aren't worth the maintenance costs. |
I would think these Django 1.7 changes would be welcome additions seeing how that part of the code was never updated in the first place to correctly reflect expected behavior in Django 1.7. These fixes get the test suite closer to all passing which is a win all the way around if you ask me. I don't see the issue with those changes in this pr. |
however, I would be happy to open up a new ticket after this pr is merged based on the comment I made about the remaining portion of the Django 1.7 tests not passing at: Thoughts? |
@troygrosfield Sorry, that wasn't clearly phrased: I have no objection to including those fixes in this ticket – I just figured it'd be good to defer anything which isn't necessary to making the new CBVs work so you don't feel like you have to fix unrelated test failures to get this merged. |
Happy to help the open source community! This is a good project and I want to see it succeed. With that said, are there any objections to getting this merged? |
@acdha, do you have privs to merge? Are we waiting on anything here? |
The biggest thing I'd like to see would be some tests for the new views to avoid any future regressions. |
Tests have been added. |
This is looking good – also like we can remove this expected failure? https://travis-ci.org/toastdriven/django-haystack/jobs/46879996#L1367 |
Are you referring to the following lines in
? |
Yes - the Travis logs made it look like that passed:
|
That was already there. This PR didn't change that behavior. However, I'll go ahead and remove it because I don't think it should be there either. |
Done. The following job needs to be rerun in travis: After that, all tests should be successfully passing now. |
Added generic class based search views (thanks @troygrosfield)
Next we need to mark the legacy view documentation as deprecated and update it for the new CBVs. |
👍 |
@acdha, is there a new release planned to push out the new changes anytime soon? |
There's a fair amount of stuff stacked up for 2.4 which is probably due for another triage round: https://github.com/toastdriven/django-haystack/milestones/v2.4.0 |
You guys are working very hard for update haystack, thank you very much :D |
@troygrosfield THANK YOU for this! These are the changes I was looking forward to for quite some time. |
No problem. Happy to help! |
PR is out for the doc to resolve #1133: |
Thanks to @troygrosfield for the pull-request Closes django-haystack#1139 Closes django-haystack#1133 See django-haystack#1130
Whats about FacetedSearch Views and Forms in 2.4? |
@acdha, any word on when this (2.4) will be released? |
No idea 👍 |
There's a release candidate on PyPI now: pip install django-haystack==2.4.0rc1 |
Wow, but, i prefers wait for the oficial release :D. |
This addresses the need for django-haystack's django style class based views. This is based on the discussion from the following PR:
This work was originally done by @bennylope with only minor changes from his original file:
This PR addresses the following issues: