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" data-content="jet-code-div"></div> <div class="cart-jetcode-def" css-jetcode-href="https://absolute.path/to/custom.css" data-content="jet-code-div"></div> <div class="checkout-jetcode-def" css-jetcode-href="https://absolute.path/to/custom.css" data-content="jet-code-div" jetcode-options="zipCode"></div> <div class="payinresult-jetcode-def" css-jetcode-href="https://absolute.path/to/custom.css" data-content="jet-code-div"></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()
})
}
Metadata
Release files for djangocms-dag-jetcode 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| djangocms_dag_jetcode-1.1.2.tar.gz | 16.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| djangocms_dag_jetcode-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.0 kB
Release files / djangocms_dag_jetcode-1.1.2.tar.gz
| Download URL | djangocms_dag_jetcode-1.1.2.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bf152459b4abcfaaca21a19c3f8f9904ed0622938d3ebd7cf2b706fed74ca4b
|
|
BLAKE2b-256 checksum How to use checksums |
6fe8158adfd8ac7ea7ecb125aa73fb7b30e3c8fb8d6546ff328567ac36c70fc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.7 Linux/5.10.104-linuxkit
|
Release files / djangocms_dag_jetcode-1.1.2-py3-none-any.whl
| Download URL | djangocms_dag_jetcode-1.1.2-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0244752b0dce7aa6e698f585302d11b93ab4b8801574b6dca65b3f2230ec053b
|
|
BLAKE2b-256 checksum How to use checksums |
2abedc8897be36e2f96685b6691748879869ad46a9cf069e360b39d6012ae342
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.7 Linux/5.10.104-linuxkit
|