Name | django-oscar-bluelight JSON |
Version |
5.10.2
JSON |
| download |
home_page | None |
Summary | Bluelight Specials - Enhancements to the offer and vouchers features for Django Oscar. |
upload_time | 2025-07-16 18:23:09 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.13 |
license | ISC |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Django Oscar Bluelight Specials
[](https://pypi.python.org/pypi/django-oscar-bluelight)
[](https://pypi.python.org/pypi/django-oscar-bluelight)
[](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": ">=3.13",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "thelab <thelabdev@thelab.co>",
"download_url": "https://files.pythonhosted.org/packages/ea/52/de57bfe87b39bae852c26a6bf582eff00c793ca0a0550ce61f17207e3fd4/django_oscar_bluelight-5.10.2.tar.gz",
"platform": null,
"description": "# Django Oscar Bluelight Specials\n\n[](https://pypi.python.org/pypi/django-oscar-bluelight)\n[](https://pypi.python.org/pypi/django-oscar-bluelight)\n[](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",
"bugtrack_url": null,
"license": "ISC",
"summary": "Bluelight Specials - Enhancements to the offer and vouchers features for Django Oscar.",
"version": "5.10.2",
"project_urls": {
"Homepage": "https://gitlab.com/thelabnyc/django-oscar/django-oscar-bluelight",
"Repository": "https://gitlab.com/thelabnyc/django-oscar/django-oscar-bluelight"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "cca9481d6ad08d08754e1223f84e543a7d98fc435a99aa00cb5ee25e148551fb",
"md5": "e694d8954680d94f5e014fcd26dbff9a",
"sha256": "7713b9221a03676b92a603a4fc496c48c4d36ad5dbde322b93b279f78a88ed31"
},
"downloads": -1,
"filename": "django_oscar_bluelight-5.10.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e694d8954680d94f5e014fcd26dbff9a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13",
"size": 628766,
"upload_time": "2025-07-16T18:23:06",
"upload_time_iso_8601": "2025-07-16T18:23:06.809431Z",
"url": "https://files.pythonhosted.org/packages/cc/a9/481d6ad08d08754e1223f84e543a7d98fc435a99aa00cb5ee25e148551fb/django_oscar_bluelight-5.10.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ea52de57bfe87b39bae852c26a6bf582eff00c793ca0a0550ce61f17207e3fd4",
"md5": "fa414aa99a8938ae81d0ebe017a2994a",
"sha256": "db1764cd27813fc5b0b10cca4ab0fa88939953d2e425543c41e57b2c80f50e9c"
},
"downloads": -1,
"filename": "django_oscar_bluelight-5.10.2.tar.gz",
"has_sig": false,
"md5_digest": "fa414aa99a8938ae81d0ebe017a2994a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 3561363,
"upload_time": "2025-07-16T18:23:09",
"upload_time_iso_8601": "2025-07-16T18:23:09.006076Z",
"url": "https://files.pythonhosted.org/packages/ea/52/de57bfe87b39bae852c26a6bf582eff00c793ca0a0550ce61f17207e3fd4/django_oscar_bluelight-5.10.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-16 18:23:09",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "thelabnyc",
"gitlab_project": "django-oscar",
"lcname": "django-oscar-bluelight"
}