.. _changelog:
=========================
Changelog for django-SHOP
=========================
1.0.1
=====
* Fix error in admin interface for ``Notification``detail view.
* Refactor all internal model checks to use classmethod ``check()`` provided by Django.
1.0
===
* Replace various files containing Python requirements against ``Pipfile`` to be used by pipenv_.
* Migrated all default templates to use Bootstrap-4 and replace all tables using the HTML tag
``
`` against flex elements.
* Switch to py.test_ in favor of Django test-cases.
* It now is possible to override the forms for selecting the payment-, shipping- and extra
annotation using a configuration directive.
* Adopted to django-CMS version 3.5.
* Fix all compatibility issues with Django-1.11.
* Fix all compatibility issues with Django REST framework 3.8.
* Upgrade to angular-ui-bootstrap version 2.5. This requires djangocms-cascade version 0.17.x and a
slight modification of the navbar rendering.
* Add Order number to Order List View.
* It is possible to access the Order Detail View anonymously by using a secret in the URL.
* Remove directory ``example`` in favor of the new project cookiecutter-django-shop_.
* Customized Template Engine which keeps track on referenced images and stores then as attachments
to be used in multipart email messages. This requires a patched version of django-post_office_.
* Add ``relatated_name`` to fields ``delivery`` and ``item`` to the model ``Delivery``. Check your
reverse relations.
* Added an apphook ``PasswordResetApp``, so that all pages, even those to reset the password, can
now be handled by a page by the CMS.
* Pagination of catalog list view can distinguish between *auto-infinte*, *manual-infinte* and
*pagination*.
* Pagination of catalog list view prevents widow items.
* Cart widget displays a short summary of products after adding a product, or mouse-over event.
* AddToCart now optionally renders a modal dialog after adding the product.
* All forms in the checkout process can be overridden using a settings variable.
* Buttons are configurable to be disabled, if wrapping form is invalid.
* Unified all management commands into ``shop`` with different subcommands.
* Add management command ``shop check-pages`` to verify mandatory and recommended CMS pages.
* Add management command ``shop review-settings`` to verify the configuration settings.
* Refactored payment- and shipping-modifiers into their own submodules, so that they stay
side-by-side with their order workflow mixins.
* All payment- and shipping-modifiers support an instantiation either as list or as instance. This
allows to implement payment- or shipping-service-provider offering different payment- or shipping
methods themselves.
* Changed all relative import against absolute ones.
* In context for email template rendering, renamed ``data`` to a more meaningful name such as
``order``.
* Add support for inlined images when sending HTML emails.
* Replace FSM signal ``post_transition`` against a function ``transition_change_notification`` which
either is invoked by ``OrderAdmin.save_model()`` or while processing an Order through the frontend
by the customer.
* In Order event notification, add data about each delivery to the serialized Order data.
* Upgrade to djangocms-bootstrap version 1.0.2.
* Fix: Do not always refetch cart data from server.
* Improve style of rendering for invoice and delivery notes in the Order backend.
* Use specific naming for relatation of model ``DeliveryItem`` to models ``OrderItem`` and
``Delivery``.
* Add reusable scroll-spy for AngularJS directive ``navbar``.
.. _pipenv: https://pipenv.readthedocs.io/en/latest/
.. _py.test: https://docs.pytest.org/en/latest/
.. _cookiecutter-django-shop: https://github.com/awesto/cookiecutter-django-shop
.. _django-post_office: https://github.com/jrief/django-post_office/tree/attachments-allowing-MIMEBase
0.12.2
======
* Fix #729: Issue with Notification admin transition choices (RETURN_VALUE).
* Adopted templates to be used by **angular-ui-bootstrap** version 2.5.
* Compatible with **django-CMS** version 3.5.
0.12.1
======
* Fix: #724: broken amount rendering when ``USE_TOUSAND_SEPARATOR`` is ``True``.
* Adopt ``shoplinkplugin.js`` to use function ``initializeLinkTypes`` as required by
**djangocms-cascade** version 0.16.
0.13
====
* Drop support for Django-1.9, add support for Django-1.11.
* Add method ``get_weight()`` to product model, so that a cart modifier may sum up the product weights.
* Configured Cart modifiers may be a list, rather than a single instance.
* Refactor shipping and payment modifiers in ``shop/modifiers/defaults.py`` into their own files
``shop/shipping/modifiers.py`` and ``shop/payment/modifiers.py``.
* Refactor shipping workflows in ``shop/shipping/base.py`` and ``shop/shipping/defaults.py`` into their
own file ``shop/shipping/workflows.py``. Extract ``TRANSITION_TARGETS`` into their common base class.
* Refactor payment workflows in ``shop/payment/base.py`` and ``shop/shipping/defaults.py`` into their
own file ``shop/payment/workflows.py``.
* Remove unused class ``ShippingProvider``.
* Add support for SendCloud_ integration.
* When partial delivery is configured, it now is possible to create multiple deliveries concurrently.
* Add configuration directive ``SHOP_MANUAL_SHIPPING_ID`` which shall be used to make the input field
for the "Shipping ID" readonly.
* Add configuration directive ``SHOP_OVERRIDE_SHIPPING_METHOD`` which shall be used to allow the
merchant to choose another shipping provider, instead of that selected by the customer.
* Model ``DeliveryItem`` was moved into ``shop.models.defaults.delivery_item`` to prevent accidental
instantiation.
* Add ``OrderPaymentInline`` to ``OrderAdmin`` only, if status requires a payment or a refund.
* In ``OrderAdmin`` add tick to inform about a fullfilled Order payment.
* In ``ManualPaymentWorkflowMixin`` unified methods ``prepayment_partially_deposited()`` and
``prepayment_fully_deposited()`` into method ``payment_deposited()``.
* Add method ``__str__()`` to model ``BaseDelivery``.
* All models which can be used in the DialogForm, can offer a method ``as_text()`` which may render
a nicely formatted representation of its content.
* Add method ``reorder_form_fields`` to Customer model, so that inheriting models can fix the order
of form fields.
.. _SendCloud: https://www.sendcloud.eu/
0.12
====
* Adopted for django-angular version 2.0, which breaks its API. Invalid forms rejected by the server
are send with a status code of 422 now. Check their changelog for details.
* Adopted to AngularJS-1.6.6, which required to replace all ``.success()`` handlers against
a promise ``.then()``.
* RESTifyed the communication with the server, by using HTTP methods ``PUT`` and ``DELETE`` where
appropriate.
* Rename ``PayInAdvanceWorkflowMixin`` to ``ManualPaymentWorkflowMixin``, since its purpose is to
handle all incoming/outgoing payments manually.
* Move ``LeftExtensionPlugin`` and ``RightExtensionPlugin`` into module ``shop/cascade/extensions``
and allow them to be used on the ``ShopOrderViewsPlugin`` as well.
* Refactored ``ShopReorderButtonPligin`` and ``ShopOrderAddendumFormPlugin`` to use the new
``djng-forms-set`` directive, as provided by **django-angular** version 2.0.
* ``ShopOrderAddendumFormPlugin`` can optionally render historical annotations for the given order.
* Added hook methods ``cancelable()`` and ``refund_payment()`` to ``BaseOrder`` to allow
a better order cancelling interface.
* Paid but unshipped orders, now can be refunded. Possible be refactoring class
``CancelOrderWorkflowMixin``, which handles payment refunds.
* Add Order status to Order Detail View, so that the customer immediately sees what's going on.
* Reject method POST on Order List View.
* Fix: On re-add item to cart, use ``product_code`` to identify if that product already exists in cart.
* Do not render buttons and links related to the watch-list, when it is not available.
* Use Sekizai's templatetags ``{% add_data %}`` and ``{% with_data %}`` instead of Sekizai's
postprocessors ``djng.sekizai_processors.module_config`` and ``djng.sekizai_processors.module_list``,
which now are deprecated.
* Remove HTTP-Header ``X-HTTP-Method-Override`` and use PUT and DELETE requests natively.
* Remove django-angular dependency ``djng.url`` from project.
* Endpoints in JavaScript are always referenced through HTML. This eliminates the need for
``'djng.middleware.AngularUrlMiddleware'`` in ``MIDDLEWARE_CLASSES`` of your ``settings.py``.
* Use Django's internal password validator configuration ``AUTH_PASSWORD_VALIDATORS`` in your
``settings.py``.
* Refactored all templates for authentication forms to simplify inheritance and to use the promise
chain (offered by django-angular 2.0). This allows to do fine-grained adoptions in the submit
buttons behaviour.
* Decoupled all checkout forms. They don't require ``dialog.js``, ``forms-sets.js`` and ``auth.js``
anymore. Instead use the functionality provided by django-angular 2.0 form directives.
* Use a REST endpoint to add, modify and delete multiple shipping and billing addresses. This
simplifies the address forms. Remove ``shipping-address.js`` and replace it against a more generic
``address.js``.
* Use an event broadcast ``shop.carticon.caption`` to inform the carticon about changes in the cart.
* Add an overridable ``CartIconCaptionSerializer`` to specify what to render in the cart-icon.
* Use event broadcasting to inform the checkout forms if configured in summary mode. This decouples
checkout form updates, from rendering their summary on another page or process step.
* Add operator to test Money type against booleans.
* Fix: Adopt polymorphic ModelAdmin-s to django-polymorphic>=1.0.
* Add to ``ShopProceedButton``: Disable button if any form in this set is invalid.
* Use vanilla Javascript in serverside JS-expressions.
* Decoupled ``CheckoutViewSet`` from ``CartViewSet``, so that the checkout only handles forms
relevant to the checkout process.
* Endpoint ``digest`` in ``CheckoutViewSet``, returns a full description of all forms, plus the
current cart's content. Fetching from there is emit a ``shop.checkout.digest`` event.
* Added directives ``shop-payment-method`` and ``shop-shipping-method`` which update the cart and
emit a ``shop.checkout.digest`` event on change.
* Fix: All form input field get their own unique HTML ``id``. Previously some ``id``'s were used
twice and caused collisions.
* Fix: Do not rebuild list of cart items, on each change of quantity.
* Separate ``CartController`` into itself and a ``CartItemControler``.
* Consistent naming of emit and broadcast events.
* Introduce ``CartSummarySerializer`` to retrieve a smaller checkout digest.
* In Shipping- and Payment Method Form, optionally show additional charges below the radio fields,
depending on the selected method.
* Remove ``angular-message`` from the list of npm dependencies.
* Fix: Products with ``active=False`` are exempted from the catalog list views and accessing them
raises a Not Found page.
0.11.7
======
* Fix: Python3 can not handle ``None`` type in max() function.
* Smoother animation when showing Payment form.
0.11.6
======
* Fix #708: Passing ``None`` when calling ``django.template.loader.select_template``
in ``shop/cascade/catalog.py``.
0.11.5
======
* Fix: Money formatter did not work for search results.
* Image building uses docker-compose with official images instead of a crafted Dockerfile.
0.11.4
======
* Fix: Template context error while rendering Order List-View as Visitor.
* Fix: Money formatter to allow the usage of the thousand separator.
* Fix: It now is possible to use the ``ProductListView`` as the main CMS landing page.
* Fix: Template exception if left- or right extension was missing on the ``OrderList``
and/or ``OrderDetail`` view.
* Add option to Catalog List View: It now is possible to redirect automatically onto a lonely
product.
* Add options to override the add-to-cart template when using the appropriate
CMS Cascade plugin.
* Add option to add a list of products to the navigation node serving a catalog list page.
* Upgrade external dependencies to their latest compatible versions.
0.11.3
======
* Fix: Problems with missing Left- and Right Extension Plugin.
* Ready for Django-1.11 if used with django-CMS-3.4.5
* Ready for django-restframework-3.7
* Tested with recent versions of other third party libraries.
* Fix issues with enum types when importing fixtures.
* Add Swedish Kronor to currencies.
0.11.2
=======
* Do not render buttons and links related to the watch-list, when it is not available.
* Fix: Adopt polymorphic ModelAdmin-s to django-polymorphic>=1.0.
* Use Sekizai's internal templatetags ``{% with_data ... %}`` and ``{% with_data %}`` to render Sekizai
blocks ``ng-requires`` and ``ng-config`` rather than using the deprecated postprocessors
``djng.sekizai_processors.module_list`` and ``djng.sekizai_processors.module_config``. Adopt your
templates accordingly as explained in :ref:`reference/client-framework`.
* Rename ``PayInAdvanceWorkflowMixin`` to ``ManualPaymentWorkflowMixin``, since its purpose is to
handle all incoming/outgoing payments manually.
* Move ``LeftExtensionPlugin`` and ``RightExtensionPlugin`` into module ``shop/cascade/extensions``
and allow them to be used on the ``ShopOrderViewsPlugin`` as well.
* ``ShopOrderAddendumFormPlugin`` can optionally render historical annotations for the given order.
* Added hook methods ``cancelable()`` and ``refund_payment()`` to ``BaseOrder`` to allow
a better order cancelling interface.
* Paid but unshipped orders, now can be refunded. Possible be refactoring class
``CancelOrderWorkflowMixin``, which handles payment refunds.
* Add Order status to Order Detail View, so that the customer immediately sees what's going on.
* Add support for Python-3.6.
0.11.1
======
* Fix migration ``0007_notification`` to handle field ``mail_to`` correctly.
* Allow transition to cancel order only for special targets.
* Add operator to test Money type against booleans.
0.11
====
* Fix: :class:`shop.rest.renderers.CMSPageRenderer` always uses the template offered by the CMS page,
rather than invoking method ``get_template_names()`` from the corresponding ``APIView`` class.
* Feature: Add class:`shop.rest.renderers.ShopTemplateHTMLRenderer` which is the counterpart of
:class:`shop.rest.renderers.CMSPageRenderer`, usable for hardcoded Django views.
* Refactor: In examples *polymorphic* and *i18n_polymorphic*, renamed ``SmartPhone`` to ``SmartPhoneVariant``.
* Feature: In :class:`shop.money.fields.MoneyFormField` use a widget which renders the currency.
* Refactor: In :class:`shop.money.fields.MoneyField`, drop support for implicit default value, since it
causes more trouble than benefit.
* Fix: Handle non-decimal types in :meth:`shop.money.fields.MoneyField.get_db_prep_save`.
* Fix: In AngularJS, changes on filters and the search field did not work on Safari.
* Fix: In :meth:`shop.views.auth.AuthFormsView.post` create a customer object from request for
a visiting customers, rather than responding with *BAD REQUEST*.
* Fix: :meth:`shop.models.order.OrderManager.get_summary_url` only worked for views rendered
as CMS page. Now it also works for static Django views.
* Simplified all methods ``get_urls()`` from all classes derived from ``CMSApp`` by exploiting
CMS-PR 5898 introduced with django-CMS-3.4.4.
* Remove field ``customer`` from :class:`shop.serializers.order.OrderListSerializer`, since it
interfered with the ``customer`` object on the global template_context namespace, causing template
`shop/navbar/login-logout.html` to fail.
* Management command ``fix_filer_bug_965`` is obsolete with django-filer-1.2.8.
* Fix: Use caption in Order Detail View.
* Add Leaflet Map plugin from djangocms-cascade for demonstration purpose.
* Moved ``package.json`` into ``example/package.json`` (and with it ``node_modules``) since it
shall be part of the project, rather than the Django app.
* Fix: In :meth:`shop.models.order.BaseOrderItem.populate_from_cart_item` the ``unit_price`` is
takes from the ``cart_item``, rather than beeing recalculated.
* :class:`shop.cascade.cart.ShopCartPlugin` accepts two children: ``ShopLeftExtension`` and ``ShopRightExtension``
which can be used to add plugins inside the cart's table footer.
* In :class:`shop.models.notification.Notification` renamed field ``mail_to`` to ``recipient`` and
converted it to a ``ForeignKey``. Added an enum field ``notify`` to distinguish between different
kinds of recipients.
* Refactored ``CustomerStateField`` into a reusable :class:`shop.models.fields.ChoiceEnumField` which
can be used for both, ``Notify`` as well as ``CustomerState``.
* Adopted to **djangocms-cascade** version 0.14, which allows to render static pages using plugin
descriptions in JSON.
* Added Paginator to Order List View.
* Refactored ``shop.app_settings`` into ``shop.conf.app_settings`` to be usable by Sphinx in docstrings.
* Added :meth:`shop.models.order.BaseOrder.get_all_transitions()` which returns all possible transitions
for the the Order class.
* In :class:`shop.rest.renderers.ShopTemplateHTMLRenderer` do not pollute ``template_context`` with
serialized data on the root level.
* Fix #623: Template ``auth/register-user.html`` did not validate properly, when Reset password was checked.
* Added AngularJS filter ``range`` to emulate enumerations in JavaScript.
* Fallback to hard-coded URL if CMS page for "Continue Shopping" is missing.
0.10.2
======
* Fixed migration error in ``0004_ckeditor31.py``.
* Fixed #554: Email is no longer created when notification is triggered.
* Fixed: Using a ``ManyToManyField`` through ``ProductPage`` ignores the blank attribute,
when saving a product in the admin backend.
* Hard code "Cart" into tooltip for cart icon, until https://github.com/divio/django-cms/issues/5930
is fixed.
* Renders a nicer summary when rendering a multiple address form.
* Fixed: When placeholder is ``None`` raises AttributeError.
0.10.1
======
* Fixed #537 and #539: Rendering `data` in template has different results after upgrading to 0.10.
0.10.0
======
* In the backend, ``OrderAdmin`` and ``OrderItemAdmin`` may render the dictionary ``extra`` from
their associated models using a special template.
* In ``OrderAdmin`` use methods ``get_fields()`` and ``get_readonly_fields()`` as intended.
* Tested with Django-1.10. Drop support for Django-1.8.
* If an anonymous customer logs in, his current cart is merged with a cart, which has previously
been created. This has been adopted to re-use the method Product.is_in_cart()
in and finds it's Merge the contents of the other cart into this one, afterwards delete it.
* Moved field ``salutation`` from :class:`shop.models.customer.BaseCustomer` into the merchant
implementation. If your project does not use the provided default customer model
:class:`shop.models.defaults.customer.Customer`, then you should add the ``salutation`` field
to your implementation of the Customer model, if that makes sense in your use-case.
* Refactored the defaults settings for ``shop`` using an ``AppSettings`` object.
* Refactored all serializers into their own folder ``shop/serializers`` with submodules
``bases.py``, ``cart.py``, ``order.py`` and ``defaults.py``. The serializers
``CustomerSerializer``, ``ProductSummarySerializer`` and ``OrderItemSerializer`` now are
configurable through the application settings.
* AngularJS directive ```` now listens of the event "pressed ENTER key"
and submits the form data accordingly.
* Upgraded to AngularJS version 1.5.9.
* HTML5 mode is the default now.
* The previously required additional endpoint for the autocomplete search, can now be be merged
into the same endpoint as connected to the catalog's list view. This has been made possible by
the wrapper :class:`shop.search.views.CMSPageCatalogWrapper` which dispatch incoming requests
to either the :class:`shop.views.catalog.ProductListView` or, for search queries to
:class:`shop.search.views.SearchView`.
* Added choice option "Infinite Scroll" to the Cascade plugins **Catalog List View** and
**Search Results**. They influence if the paginator is rendered or trigger an event to load
more results from the server.
* Changed all Cascade plugins to follow the new API introduced in **djangocms-cascade** version 0.12.
* Directive ``shop-product-filter`` must be member of a ``