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 - 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>
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/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.0.1
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.0.1.tar.gz | 15.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| djangocms_dag_jetcode-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.9 kB
Release files / djangocms_dag_jetcode-1.0.1.tar.gz
| Download URL | djangocms_dag_jetcode-1.0.1.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a9808e7b4f4dbf70741ed9a41af0d12bcfb32f45867176fbbfd4964caccb0f2
|
|
BLAKE2b-256 checksum How to use checksums |
987b36088353e6b06d965c938dbce3d8f99ec321aa594041875536eaa83e20b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.7 Linux/5.10.47-linuxkit
|
Release files / djangocms_dag_jetcode-1.0.1-py3-none-any.whl
| Download URL | djangocms_dag_jetcode-1.0.1-py3-none-any.whl |
|---|---|
| Size | 18.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
914afd54251e5d75343b0312aac337247a7e466758593f3c70c530ec2dd84bdb
|
|
BLAKE2b-256 checksum How to use checksums |
f06acfa37afd5d9f79da9163017d226b68f319ba4f44d2a034f030f7eb1c2b05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.7 Linux/5.10.47-linuxkit
|