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_djangoto the list ofINSTALLED_APPSin 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9c73fff13294399b8dd8851562493dfa075772c64a207661a24d3090f9f7e15
|
|
| MD5 |
e7387d41d47e7052d2278a22e4580097
|
|
| BLAKE2b-256 |
0f4de975a07aa408362cefedde2ba96f37782e0bc0d841007591e91898776fd9
|
File details
Details for the file prefab_cloud_django-0.2.0-py3-none-any.whl.
File metadata
- Download URL: prefab_cloud_django-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.7 Darwin/22.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e299ad18782373a9e10a019707efc8db3f6c78870dcd1d8feb10cae2ef66bcf1
|
|
| MD5 |
90ce0406ad85269720ee2c942d391903
|
|
| BLAKE2b-256 |
02565295e6910677cebb17af70678252dd99bd37b2999b3fcef3e40351e05541
|