Skip to main content

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

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 default

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

# with context

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

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.2.0.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: prefab_cloud_django-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 e9c73fff13294399b8dd8851562493dfa075772c64a207661a24d3090f9f7e15
MD5 e7387d41d47e7052d2278a22e4580097
BLAKE2b-256 0f4de975a07aa408362cefedde2ba96f37782e0bc0d841007591e91898776fd9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefab_cloud_django-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e299ad18782373a9e10a019707efc8db3f6c78870dcd1d8feb10cae2ef66bcf1
MD5 90ce0406ad85269720ee2c942d391903
BLAKE2b-256 02565295e6910677cebb17af70678252dd99bd37b2999b3fcef3e40351e05541

See more details on using hashes here.

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