CML is a reusable Django app for data exchange in CommerceML 2 standard.
This packet is available here: https://pypi.org/project/django-cml2
Requirements
Python 3.3, 3.4, 3.5, 3.6
Django 3.2
Quick start
Install using pip:
pip install django-cml2
or clone the repo and add to your virtual environment venv:
# cd <your_project> # source venv/bin/activate git clone https://github.com/sergey-gru/django-cml2.git pip install --editable django-cml2
Add ‘cml’ to your settings.py like this:
INSTALLED_APPS = [ ... 'cml', ]Include the cml URLconf in your project urls.py like this:
urlpatterns = [ ... path('cml', include('cml.urls')), ]To create cml models run:
python manage.py migrate cml
Create a template of cml_delegate.py:
python manage.py cml_init
Register it to settings.py file like this:
CML_USER_DELEGATE = 'cml_delegate' # CML_USER_DELEGATE = 'app.cml_delegate'
Modify methods to stack new cml packet with your django models.
Add logger settings to your settings.py:
LOGGING = { 'version': 1, ... 'handlers': { 'console': {...}, 'log_debug': {...}, 'log_info': {...}, }, 'loggers': { ... # Logging important change process 'cml.views': { 'handlers': ['console', 'log_debug', 'log_info'] if DEBUG else ['log_info'], 'level': 'DEBUG', 'propagate': False, }, 'cml.utils': { 'handlers': ['console', 'log_debug', 'log_info'] if DEBUG else ['log_info'], 'level': 'INFO', 'propagate': False, }, } }
Release notes
1.0.0 This version was forked from https://github.com/ArtemiusUA/django-cml
Metadata
Release files for django-cml2 1.0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-cml2-1.0.0.4.tar.gz | 27.4 kB | Without provenance | Details for django-cml2-1.0.0.4.tar.gz |
Release files / django-cml2-1.0.0.4.tar.gz
| Download URL | django-cml2-1.0.0.4.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
205883209f42b3465bed57a5346a539513c55e2a153082ad29745f1022aa3ad7
|
|
BLAKE2b-256 checksum How to use checksums |
eb0bf2b50624ae6d3fb7ff6f3d2e6d74be262b6f5b0f54eb55fb375ab90515e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Security for django-cml2 1.0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.