Introduces the concept of a "feature" that can be hidden. A list of
features to hide can be supplied in OSCAR_HIDDEN_FEATURES.
Feature hiding is currently supported in two places.
Application instances can carry a "hidable_feature_name". If set and
found in OSCAR_HIDDEN_FEATURES, post_process_urls will return an empty
set of url patterns, hence disabling relevant views.
display_tags also has a new template block tag iffeature.
{% iffeature "feature" %}xxx{% endiffeature %} will hide everything
inside the block if the feature is hidden.
This commit provides two mechanisms for passing format information from
Django to JS.
1. An options object can be passed to the oscar.dashboard.init method
that provides default values for the formats. This is optional - the JS
itself has some hard-coded defaults.
2. Form elements can defined data attributes that specify format
information directly. This is implemented for the datetime inputs
within the offers dashboard.
The "Browse categories" section was limited to two levels of
inheritance. Fixing this and keeping the iterative nature of the
template tag required rewriting it, borrowing heavily from treebeards
get_annotated_list method.
Fixes #672
When adding to the basket, products with options were treated as
different products for each combination of options. This allowed adding
more products into the basket than are available for purchase.
The handling has been updated to sum up the already added quantity of
the product regardless of options.
Fixes #665
Change compressor settings to fix relative URL issue
When the LESS files are served but compression is disabled, the relative
URL between the generated CSS and other assets is wrong (using the
default compressor settings). This fixes changes the output directory
name to match the path of Oscar's assets, which fixes this issue.
Related to https://github.com/jezdez/django_compressor/issues/226
Fixes #649
Since variables were required to be passed in, this forced evaluation of
the i18n string which caused a circular reference when Django started
up.
This isn't a permanent solution - just a workaround until search gets
the a reworking.
Render promotions within content block of layout.html
Promotions were omitted from the main layout block (accidentally I
imagine). I think they used to be there - perhaps a template refactor
stripped them out.
This commit reinstates them so pages that use the default layout
template (like flatpages) can have promotions added to them.