Skip to main content

Render context into template.

Project description

DjangoCMS Render Context

The plugin for the Django CMS content management system. The plugin displays the context in the template. The context can be specified directly in JSON format. Or the context can be used as a media file. Or the context can be loaded from a URL. The template can be entered directly or selected from a list defined in the settings in the DJANGOCMS_RENDER_CONTEXT_TEMPLATES constant.

Supported source data formats (mimetype):

  • csv (text/csv)
  • json (application/json)
  • yaml (application/yaml)
  • xml (application/xml)
  • ods (application/vnd.oasis.opendocument.spreadsheet)

Install

Install the package from pypi.org.

pip install djangocms-render-context

Add into INSTALLED_APPS in your site settings.py:

INSTALLED_APPS = [
    ...
    "easy_thumbnails",
    "filer",
    "djangocms_render_context",
]

Add into site urls.py:

from django.conf.urls.i18n import i18n_patterns
from django.views.i18n import JavaScriptCatalog
from django.urls import path

urlpatterns = [
    ...
] + i18n_patterns(
    path('jsi18n/<slug:packages>/', JavaScriptCatalog.as_view(), name='jsi18n'),
)

Extra settings

This value can be defined in settings.

  • DJANGOCMS_RENDER_CONTEXT_TEMPLATES - List of templates that the plugin can use.

For example:

DJANGOCMS_RENDER_CONTEXT_TEMPLATES = (
    ("", ""),
    ("plugin.html", "Plugin"),
    ("schedule.html", "Schedule"),
)

License

BSD-3-Clause

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

djangocms_render_context-1.2.0.tar.gz (308.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djangocms_render_context-1.2.0-py3-none-any.whl (320.9 kB view details)

Uploaded Python 3

File details

Details for the file djangocms_render_context-1.2.0.tar.gz.

File metadata

  • Download URL: djangocms_render_context-1.2.0.tar.gz
  • Upload date:
  • Size: 308.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for djangocms_render_context-1.2.0.tar.gz
Algorithm Hash digest
SHA256 d7b8f478a0c1d89f7445024bddf442823bce8597d5e8439fe46c9123177a415e
MD5 3d973cf5f7148c74b746ba069465b289
BLAKE2b-256 4f660c3a7e14746b0799dbc027d29c986fed21e7dc88d35de22bae6462474a2a

See more details on using hashes here.

File details

Details for the file djangocms_render_context-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for djangocms_render_context-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 505c6c7028ffc2ebc1435fd6ef13694f57f6b9765f845806b71479274a04e5f1
MD5 dad1b15c655428a69421e60dd99eb735
BLAKE2b-256 e15bacfd5573b4ef33bf7e539cbf47cdbed9a822218686849d267b906cc343a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page