Skip to main content

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.

preview djangocms-dag-jetcode

Requirements

  • Python 3.8+
  • Django 2.0+
  • Django CMS 3.8.0+

Installation

  • run pip install djangocms-dag-jetcode
  • add djangocms_dag_jetcode to your INSTALLED_APPS
  • include in your urls.py
    path(
        "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.css base style for all Jetcodes
  • static/djangocms_dag_jetcode/css/product.css product Jetcodes
  • static/djangocms_dag_jetcode/css/productselector.css product selector Jetcodes
  • static/djangocms_dag_jetcode/css/package.css package Jetcodes
  • static/djangocms_dag_jetcode/css/container.css container Jetcodes
  • static/djangocms_dag_jetcode/img/calendar-icon.png the calendar icon
  • templates/djangocms_dag_jetcode/default.html the 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.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djangocms-dag-jetcode 1.2.0
File Size Uploaded
djangocms_dag_jetcode-1.2.0.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for djangocms-dag-jetcode 1.2.0
File Interpreter ABI Platform
djangocms_dag_jetcode-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.1 kB

Release files / djangocms_dag_jetcode-1.2.0.tar.gz

Download URL djangocms_dag_jetcode-1.2.0.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d7c46bcbe22f2561dea239663f52e18d5577db702b0a28e5af22a9abf7cf5ec4
BLAKE2b-256 checksum
How to use checksums
3089f2523763a36d606c3416776c8e4228726aa5c978d8910dd7fd9350cf9898
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.8 Linux/6.3.13-linuxkit

Release files / djangocms_dag_jetcode-1.2.0-py3-none-any.whl

Download URL djangocms_dag_jetcode-1.2.0-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5959e827c7f4a4cbfd73388ae6cb46995ae740b8a0e19ed33487f9259162ebde
BLAKE2b-256 checksum
How to use checksums
10c4f99a6091b53bd166ffa1f7b8500c72a9aac42c33564c635b00885dae9958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.8 Linux/6.3.13-linuxkit

Release history Release notifications | RSS feed

1.3.1

2 release files

1.2.1

2 release files

This release

1.2.0 This release

2 release files

1.1.2

2 release files

1.0.3

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page