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
- Add this project to your Django application's dependencies
- Add
prefab_cloud_django
to the list ofINSTALLED_APPS
in your app'ssettings.py
- Configure your Prefab client in
settings.py
options = prefab.Options(
api_key="...",
...
log_boundary=BASE_DIR,
)
PREFAB = prefab.Client(options)
LOGGER = PREFAB.logger
-
In your templates, add
{% load prefab_tags %}
-
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for prefab_cloud_django-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9c73fff13294399b8dd8851562493dfa075772c64a207661a24d3090f9f7e15 |
|
MD5 | e7387d41d47e7052d2278a22e4580097 |
|
BLAKE2b-256 | 0f4de975a07aa408362cefedde2ba96f37782e0bc0d841007591e91898776fd9 |
Close
Hashes for prefab_cloud_django-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e299ad18782373a9e10a019707efc8db3f6c78870dcd1d8feb10cae2ef66bcf1 |
|
MD5 | 90ce0406ad85269720ee2c942d391903 |
|
BLAKE2b-256 | 02565295e6910677cebb17af70678252dd99bd37b2999b3fcef3e40351e05541 |