Skip to main content

Custom template tags for using prefab-cloud-python in Django applications

Reason this release was yanked:

Not correctly updated to work against the related version of prefab-cloud-python

Project description

prefab-cloud-django

This project provides custom template tags for using prefab-cloud-python in Django applications

Usage

  1. Add this project to your Django application's dependencies
  2. Add prefab_cloud_django to the list of INSTALLED_APPS in your app's settings.py
  3. Configure your Prefab client in settings.py
options = prefab.Options(
    api_key="...",
    ...
    log_boundary=BASE_DIR,
)

PREFAB = prefab.Client(options)
LOGGER = PREFAB.logger
  1. In your templates, add {% load prefab_tags %}

  2. Use these tags

{% prefab_get "name-of-config" %}
{% prefab_enabled "name-of-flag" %}

# with lookup key

{% prefab_get "name-of-config" lookup_key="lookup_key" %}

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

prefab_cloud_django-0.1.1.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

prefab_cloud_django-0.1.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file prefab_cloud_django-0.1.1.tar.gz.

File metadata

  • Download URL: prefab_cloud_django-0.1.1.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.7 Darwin/22.5.0

File hashes

Hashes for prefab_cloud_django-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a23b61e458caa633f9a9b35e78593986839b975149c40c9e20cf6cc48e3d5437
MD5 2428ef443443a64936aaa9e161c37c58
BLAKE2b-256 3c5e93368bc8501c681d9e1ab937594f16333d2b25170c208773af6297742c26

See more details on using hashes here.

Provenance

File details

Details for the file prefab_cloud_django-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for prefab_cloud_django-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbee84933d5eb6d20ccbe247cec24cde10db11fe3fb3dc3b0f21795b329742ba
MD5 11c896d02a722cdf697e970ba841480f
BLAKE2b-256 50784be6ccd6d43120e1c8593bc686d255464dbb4f25acc565a5d9334b3fd7a6

See more details on using hashes here.

Provenance

Supported by

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