Use new haystack views and remove the now unused search handlers (#4187)
* Progress
* klunk
* het werkt
* blegh
* Remove more stuff
* First product class else products can not be indexed in tests
* klunk
* Make the views the same names as before, move it all
* Remove unused generic_views.py
* Fix is public and parent issue
* klaas
* Include spelling as default for suggestions to work
* make the context way better
* lint
* Add startup check for product search handler
* The
* stupid
* Lint
* Fix weird stuff in forms
* Make facets work
* Fix some stuff for haystack
* try the backend
* fix all the versoins
* v4 en v5
Make fixes for deprecations in Django 3.2 and Python
- Add new "DEFAULT_AUTO_FIELD" Django 3.2 setting
- Fix deprecated (in "gettext") use of non-int numbers for selecting
plural translations
- Provide "get_response" callable when creating middleware-factory
instance in tests
* Implement basic abstract thumbnails generator backend
* Create `oscar_thumbnail` template tag in `image_tags`
* Add `easy_thumbnails` to `INSTALLED_APPS` in sandbox settings
* Modify `primary_image` method of `Product` model
* Override in templates Sorl's `thumbnail` tag with `oscar_thumbnail` tag
* Check that related module is installed during thumbnail class initialization
* Add params to `original` field of `ProductImageFactory`
* Add media related URLs to test settings
* Add unit tests for thumbnailer backend
* Create test helpers in `test/utils`
These helpers will be used in tests related to thumbnails
* Add tests to check `oscar_thumbnail` template tag
* Add test to check images/thumbnails deleted for deleted product
* Move `sorl-thumbnail` and `easy-thumbnails` to `extras_require`
With this change these packages can be installed as
* `pip install django-oscar[sorl-thumbnail]`
* `pip install django-oscar[easy-thumbnails]`
* Updated "Template tags" section in docs with info about `oscar_thumbnail`
* Describe `OSCAR_THUMBNAILER` setting in "Settings" section of the docs
* Add information about created thumbnail backend to the release notes
- Move Oscar app configs into Django app config classes
- Rename Oscar/Django apps' app config module
- Remove "oscar.get_core_apps()" and its app overriding
- Remove "oscar.OSCAR_CORE_APPS"
- Port app forking code to work with Django app registry
- Port class loading code to use app configs to get app properties
Switch to using Django's password validation framework in Django >=1.9
Django 1.9 introduced the AUTH_PASSWORD_VALIDATORS setting which allows for
more flexible password validation. Switch to using that when it is available,
with a fallback to Oscar's previous behaviour in Django 1.8 or when this
setting is empty.
Remove obsolete debug toolbar settings from sandbox. Fixes #2229.
`DEBUG_TOOLBAR_PATCH_SETTINGS` is obsolete in django-debug-toolbar 1.6. We also don't need to specify `DEBUG_TOOLBAR_PANELS` as it is identical to the default.
As part of my last PR, I had USE_LESS enabled for testing purposes and
accidentally committed the setting. By default, we don't want to run the
(somewhat slow) pre-processor!
- Set Meta.app_label on models created in the tests
- Use logging.NullHandler instead of django.utils.log.NullHandler
- Use oscar.core.loading.get_model() instead of django's get_model
- Remove template tags '{% load url from future %}'
django-compressor used to trigger processing of the less files during
development. But with the browser-based compiler, an easy replacement is
available. This even lowers the barrier to altering styles, because
getting npm up and running isn't required.
Offline compilation isn't impacted.
Using the most current less version seems to not cause any trouble, so I
removed the version requirement.
django-compressor served it's purpose, but given the advent of
more and more frontend JS work, and the accompanying build tools (grunt,
gulp, etc.), it makes less and less sense to use compressor. Jannis
Leidel himself also stepped back from maintaining it.
In my experience with Oscar project, it has also become a bit of a
liability to have compressor as a dependency. Most projects don't use it
any more, but it's not easy to disable/override because all our
templates include it.
So, let's keep things simple and remove it as a dependency. That paves
the way for using other tools, while it's always easy to add back.
This removes all the bits and bobs where we referenced South, or added
some code supporting it. Documentation will be updated in a later
commit, together with other Django changes.