Django CMS DAG Jetcode is a plugin for Django CMS that allows you to add DAG System's Jetcodes on your site.
Project description
djangocms-dag-jetcode
Django CMS DAG Jetcode is a plugin for Django CMS that allows you to add DAG System's Jetcodes on your site.
Requirements
- Python 3.8+
- Django 2.0+
- Django CMS 3.8.0+
Installation
- run
pip install djangocms-dag-jetcode - add
djangocms_dag_jetcodeto yourINSTALLED_APPS - include in your
urls.pypath( "djangocms-dag-jetcode/", include("djangocms_dag_jetcode.urls", namespace="djangocms-dag-jetcode"), ),
- run
python manage.py migrate djangocms_dag_jetcode - import DAG's scripts before the closing
</body>tag<script src="https://jetcode.dag-system.com/jetcodes/fr?customerID=<your customer id>" defer></script>
- add required
<div>for the basket<div class="basket-jetcode" data-basket-id="0" css-jetcode-href="https://absolute.path/to/custom.css"></div>
- add required
<div>for the popups<div class="rate-jetcode-def" css-jetcode-href="https://absolute.path/to/custom.css"></div> <div class="cart-jetcode-def" css-jetcode-href="https://absolute.path/to/custom.css"></div> <div class="checkout-jetcode-def" css-jetcode-href="https://absolute.path/to/custom.css"></div> <div class="payinresult-jetcode-def" css-jetcode-href="https://absolute.path/to/custom.css"></div> <div class="shippinginfo-jetcode-def" css-jetcode-href="https://absolute.path/to/custom.css"></div> <div class="productinfo-jetcode-def" css-jetcode-href="https://absolute.path/to/custom.css"></div>
You can override some files to customize the style:
static/djangocms_dag_jetcode/css/base.cssbase style for all Jetcodesstatic/djangocms_dag_jetcode/css/product.cssproduct Jetcodesstatic/djangocms_dag_jetcode/css/productselector.cssproduct selector Jetcodesstatic/djangocms_dag_jetcode/css/package.csspackage Jetcodesstatic/djangocms_dag_jetcode/css/container.csscontainer Jetcodesstatic/djangocms_dag_jetcode/img/calendar-icon.pngthe calendar icontemplates/djangocms_dag_jetcode/default.htmlthe template used to render the Jetcodes
Settings
Styles choices
DJANGOCMS_DAG_JETCODE_STYLE_CHOICES = [
("my-style", "My custom style"),
]
defaults to []
Each style defined in this setting must have a corresponding CSS file in {STATIC_ROOT}/djangocms_dag_jetcode/css/ (for example: my-style.css).
Cache timeout
Set the cache timeout for the get_css view.
DJANGOCMS_DAG_JETCODE_CACHE_TIMEOUT = 15 * 60
defaults to 15 * 60 (15 minutes)
When DEBUG=True, you can set this setting to 0 to disable the cache.
Reload Jetcode after CMS plugin edit
When you add or edit a plugin, the CMS does not reload the entire page. You should re-instantiate the Jetcodes to display them without a page refresh. Add this code to your pages:
if (window.hasOwnProperty('CMS') === true) {
CMS.$(window).on('cms-content-refresh', function () {
initJetcode()
})
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djangocms_dag_jetcode-1.2.1.tar.gz.
File metadata
- Download URL: djangocms_dag_jetcode-1.2.1.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Linux/5.10.104-linuxkit
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a89e2d69a6aa56875511f1b2e3abc08d6a5c3deccaa7512250f117f7957c3f3
|
|
| MD5 |
16223e1fc1214f6ce6d038992d108858
|
|
| BLAKE2b-256 |
715276b66dc24cc25665875b4009816be5c2c6720f21f737da159aa15b622c54
|
File details
Details for the file djangocms_dag_jetcode-1.2.1-py3-none-any.whl.
File metadata
- Download URL: djangocms_dag_jetcode-1.2.1-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Linux/5.10.104-linuxkit
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a9d71bebc43477c85bcb0a4cb79827daf670a1eb97044b23d574ead7c73d755
|
|
| MD5 |
da192269a98fc7c84bac422060c028a1
|
|
| BLAKE2b-256 |
9d4ae8a11674b7a3f6869c5231738b7b66dadd0293a2ea17a766a97c0adb55f2
|