Name | django-oscar-bluelight JSON |
Version |
5.7.1
JSON |
| download |
home_page | None |
Summary | Bluelight Specials - Enhancements to the offer and vouchers features for Django Oscar. |
upload_time | 2025-01-21 21:57:52 |
maintainer | None |
docs_url | None |
author | thelab |
requires_python | <4.0,>=3.12 |
license | ISC |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Django Oscar Bluelight Specials
[![license](https://img.shields.io/pypi/l/django-oscar-bluelight.svg)](https://pypi.python.org/pypi/django-oscar-bluelight)
[![kit](https://badge.fury.io/py/django-oscar-bluelight.svg)](https://pypi.python.org/pypi/django-oscar-bluelight)
[![format](https://img.shields.io/pypi/format/django-oscar-bluelight.svg)](https://pypi.python.org/pypi/django-oscar-bluelight)
This package contains enhancements and improvements to the built-in
offers and vouchers features in Django Oscar.
## Features
- **Group Restricted Vouchers**: Bluelight adds the ability to restrict application of vouchers to a specific whitelist of groups (`django.contrib.auth.models.Group`). For example, you could create a voucher code that can only be applied by users who belong to the group _Customer Service Reps_.
- **Compound Offer Conditions**: By default, Oscar only allows assigning a single condition to a promotional offer. Compound offer conditions allow you to create more complex logic around when an offer should be enabled. For example, you could create a compound condition specifying that a basket must contain at least 3 items _and_ have a total value greater than $50.
- Compound conditions can aggregate an unlimited number of child conditions together.
- Compound conditions can join their child conditions using either an _AND_ or an _OR_ conjunction.
- Very complex conditions requiring both _AND_ and _OR_ conjunctions can be modeled by creating multiple levels of compound conditions.
- **Parent / Child Voucher Codes**: By default Oscar doesn't support bulk creation of voucher codes. Bluelight adds the ability to bulk create any number of child vouchers (with unique, automatically generated codes) for any standard (non-child) voucher. This can be useful when sending voucher codes to customer's through email, as it allows the creation of hundreds or thousands of non-sequential, one-time-use codes.
- Child codes can be added when creating a new voucher or after a voucher is created.
- More child codes can be generated for a voucher at any time.
- Child codes can be exported in CSV and JSON formats.
- Any time a parent voucher is edited (name changed, benefit altered, etc), all child codes are also updated to match.
- When a parent voucher is deleted, all children are also deleted.
- Once a voucher has child codes assigned to it, the parent voucher itself can not be applied by anyone.
## Roadmap
- Make child code creation and updating more performant, possibly by (1) extracting some of the work into asynchronous Celery tasks and (2) better tracking of dirty model fields before saving.
- Add ability to duplicate vouchers.
- Add ability to add conditions to vouchers.
## Caveats
Bluelight currently works by forking four of Oscar's apps: offer,
voucher, dashboard.offers, and dashboard.vouchers. Currently there is no
way to use Bluelight if your application has already forked those
applications.
## Installation
Install [django-oscar-bluelight]{.title-ref}.:
```sh
pip install django-oscar-bluelight
```
Import Bluelight's settings into your projects `settings.py` file.
```py
from oscar.defaults import *
from oscarbluelight.defaults import * # Needed so that Bluelight's views show up in the dashboard
```
Add Bluelight to your installed apps (replacing the equivalent Django
Oscar apps). The top-level `oscarbluelight` app must be defined before
the `oscar` app---if it isn't Django will not correctly find the
Bluelight's templates.
```py
INSTALLED_APPS = [
...
# Bluelight. Must come before `django-oscar` so that template inheritance / overrides work correctly.
'oscarbluelight',
'thelabdb.pgviews',
# django-oscar
'oscar',
'oscar.apps.analytics',
'oscar.apps.checkout',
'oscar.apps.address',
'oscar.apps.shipping',
'oscar.apps.catalogue',
'oscar.apps.catalogue.reviews',
'sandbox.partner', # 'oscar.apps.partner',
'sandbox.basket', # 'oscar.apps.basket',
'oscar.apps.payment',
'oscarbluelight.offer', # 'oscar.apps.offer',
'oscar.apps.order',
'oscar.apps.customer',
'oscar.apps.search',
'oscarbluelight.voucher', # 'oscar.apps.voucher',
'oscar.apps.wishlists',
'oscar.apps.dashboard',
'oscar.apps.dashboard.reports',
'oscar.apps.dashboard.users',
'oscar.apps.dashboard.orders',
'oscar.apps.dashboard.catalogue',
'oscarbluelight.dashboard.offers', # 'oscar.apps.dashboard.offers',
'oscar.apps.dashboard.partners',
'oscar.apps.dashboard.pages',
'oscar.apps.dashboard.ranges',
'oscar.apps.dashboard.reviews',
'oscarbluelight.dashboard.vouchers', # 'oscar.apps.dashboard.vouchers',
'oscar.apps.dashboard.communications',
'oscar.apps.dashboard.shipping',
...
]
```
Fork the basket application in your project and add
`BluelightBasketMixin` as a parent class of the `Line` model.
```py
from oscar.apps.basket.abstract_models import AbstractLine
from oscarbluelight.mixins import BluelightBasketLineMixin
class Line(BluelightBasketLineMixin, AbstractLine):
pass
from oscar.apps.basket.models import * # noqa
```
## Usage
After installation, the new functionality will show up in the Oscar
dashboard under the Offers menu.
Raw data
{
"_id": null,
"home_page": null,
"name": "django-oscar-bluelight",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": null,
"author": "thelab",
"author_email": "thelabdev@thelab.co",
"download_url": "https://files.pythonhosted.org/packages/0b/95/3b102f97f1e643cf50ad394a68288eae30e9c85a77c0a60b8912b0694f86/django_oscar_bluelight-5.7.1.tar.gz",
"platform": null,
"description": "# Django Oscar Bluelight Specials\n\n[![license](https://img.shields.io/pypi/l/django-oscar-bluelight.svg)](https://pypi.python.org/pypi/django-oscar-bluelight)\n[![kit](https://badge.fury.io/py/django-oscar-bluelight.svg)](https://pypi.python.org/pypi/django-oscar-bluelight)\n[![format](https://img.shields.io/pypi/format/django-oscar-bluelight.svg)](https://pypi.python.org/pypi/django-oscar-bluelight)\n\nThis package contains enhancements and improvements to the built-in\noffers and vouchers features in Django Oscar.\n\n## Features\n\n- **Group Restricted Vouchers**: Bluelight adds the ability to restrict application of vouchers to a specific whitelist of groups (`django.contrib.auth.models.Group`). For example, you could create a voucher code that can only be applied by users who belong to the group _Customer Service Reps_.\n- **Compound Offer Conditions**: By default, Oscar only allows assigning a single condition to a promotional offer. Compound offer conditions allow you to create more complex logic around when an offer should be enabled. For example, you could create a compound condition specifying that a basket must contain at least 3 items _and_ have a total value greater than $50.\n - Compound conditions can aggregate an unlimited number of child conditions together.\n - Compound conditions can join their child conditions using either an _AND_ or an _OR_ conjunction.\n - Very complex conditions requiring both _AND_ and _OR_ conjunctions can be modeled by creating multiple levels of compound conditions.\n- **Parent / Child Voucher Codes**: By default Oscar doesn't support bulk creation of voucher codes. Bluelight adds the ability to bulk create any number of child vouchers (with unique, automatically generated codes) for any standard (non-child) voucher. This can be useful when sending voucher codes to customer's through email, as it allows the creation of hundreds or thousands of non-sequential, one-time-use codes.\n - Child codes can be added when creating a new voucher or after a voucher is created.\n - More child codes can be generated for a voucher at any time.\n - Child codes can be exported in CSV and JSON formats.\n - Any time a parent voucher is edited (name changed, benefit altered, etc), all child codes are also updated to match.\n - When a parent voucher is deleted, all children are also deleted.\n - Once a voucher has child codes assigned to it, the parent voucher itself can not be applied by anyone.\n\n## Roadmap\n\n- Make child code creation and updating more performant, possibly by (1) extracting some of the work into asynchronous Celery tasks and (2) better tracking of dirty model fields before saving.\n- Add ability to duplicate vouchers.\n- Add ability to add conditions to vouchers.\n\n## Caveats\n\nBluelight currently works by forking four of Oscar's apps: offer,\nvoucher, dashboard.offers, and dashboard.vouchers. Currently there is no\nway to use Bluelight if your application has already forked those\napplications.\n\n## Installation\n\nInstall [django-oscar-bluelight]{.title-ref}.:\n\n```sh\npip install django-oscar-bluelight\n```\n\nImport Bluelight's settings into your projects `settings.py` file.\n\n```py\nfrom oscar.defaults import *\nfrom oscarbluelight.defaults import * # Needed so that Bluelight's views show up in the dashboard\n```\n\nAdd Bluelight to your installed apps (replacing the equivalent Django\nOscar apps). The top-level `oscarbluelight` app must be defined before\nthe `oscar` app---if it isn't Django will not correctly find the\nBluelight's templates.\n\n```py\nINSTALLED_APPS = [\n ...\n # Bluelight. Must come before `django-oscar` so that template inheritance / overrides work correctly.\n 'oscarbluelight',\n 'thelabdb.pgviews',\n\n # django-oscar\n 'oscar',\n 'oscar.apps.analytics',\n 'oscar.apps.checkout',\n 'oscar.apps.address',\n 'oscar.apps.shipping',\n 'oscar.apps.catalogue',\n 'oscar.apps.catalogue.reviews',\n 'sandbox.partner', # 'oscar.apps.partner',\n 'sandbox.basket', # 'oscar.apps.basket',\n 'oscar.apps.payment',\n 'oscarbluelight.offer', # 'oscar.apps.offer',\n 'oscar.apps.order',\n 'oscar.apps.customer',\n 'oscar.apps.search',\n 'oscarbluelight.voucher', # 'oscar.apps.voucher',\n 'oscar.apps.wishlists',\n 'oscar.apps.dashboard',\n 'oscar.apps.dashboard.reports',\n 'oscar.apps.dashboard.users',\n 'oscar.apps.dashboard.orders',\n 'oscar.apps.dashboard.catalogue',\n 'oscarbluelight.dashboard.offers', # 'oscar.apps.dashboard.offers',\n 'oscar.apps.dashboard.partners',\n 'oscar.apps.dashboard.pages',\n 'oscar.apps.dashboard.ranges',\n 'oscar.apps.dashboard.reviews',\n 'oscarbluelight.dashboard.vouchers', # 'oscar.apps.dashboard.vouchers',\n 'oscar.apps.dashboard.communications',\n 'oscar.apps.dashboard.shipping',\n ...\n]\n```\n\nFork the basket application in your project and add\n`BluelightBasketMixin` as a parent class of the `Line` model.\n\n```py\nfrom oscar.apps.basket.abstract_models import AbstractLine\nfrom oscarbluelight.mixins import BluelightBasketLineMixin\n\nclass Line(BluelightBasketLineMixin, AbstractLine):\n pass\n\nfrom oscar.apps.basket.models import * # noqa\n```\n\n## Usage\n\nAfter installation, the new functionality will show up in the Oscar\ndashboard under the Offers menu.\n\n",
"bugtrack_url": null,
"license": "ISC",
"summary": "Bluelight Specials - Enhancements to the offer and vouchers features for Django Oscar.",
"version": "5.7.1",
"project_urls": {
"Homepage": "https://gitlab.com/thelabnyc/django-oscar-bluelight",
"Repository": "https://gitlab.com/thelabnyc/django-oscar-bluelight"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "900fb806d45eb2c8401934a4fa6d4b5419e03297ff3822f9155b2c484bee6a59",
"md5": "16dee46ea93dd5e10786ae13d848500e",
"sha256": "104f846f83072d02d15d872dfa39632854a064bc60dd43f3196f3f4fec1e39a7"
},
"downloads": -1,
"filename": "django_oscar_bluelight-5.7.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "16dee46ea93dd5e10786ae13d848500e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 612432,
"upload_time": "2025-01-21T21:57:50",
"upload_time_iso_8601": "2025-01-21T21:57:50.304459Z",
"url": "https://files.pythonhosted.org/packages/90/0f/b806d45eb2c8401934a4fa6d4b5419e03297ff3822f9155b2c484bee6a59/django_oscar_bluelight-5.7.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0b953b102f97f1e643cf50ad394a68288eae30e9c85a77c0a60b8912b0694f86",
"md5": "9046517ada197463249daa7629d7d312",
"sha256": "23335345a3bd43eaf54975482bf118593c80e285db1e802b80f01c826485139d"
},
"downloads": -1,
"filename": "django_oscar_bluelight-5.7.1.tar.gz",
"has_sig": false,
"md5_digest": "9046517ada197463249daa7629d7d312",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 533795,
"upload_time": "2025-01-21T21:57:52",
"upload_time_iso_8601": "2025-01-21T21:57:52.790894Z",
"url": "https://files.pythonhosted.org/packages/0b/95/3b102f97f1e643cf50ad394a68288eae30e9c85a77c0a60b8912b0694f86/django_oscar_bluelight-5.7.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-21 21:57:52",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "thelabnyc",
"gitlab_project": "django-oscar-bluelight",
"lcname": "django-oscar-bluelight"
}