django-walrus
Installation
pip install django-walrus- Add
walrusto your settings'sINSTALLED_APPS - That's it. Now you can go for a swim in ice-cold water, or maybe hunt a penguin.
Usage
Once django-walrus is installed, you can use the power of the
walrus operator
in your template's {% if %} statements:
{% if result := my_mode.some_expensive_method %}
Wow, check out this result: {{ result }}.
{% else %}
Nothing to see here.
{% endif %}
Is this real?
As real as a two ton polar mammal.
Optimized
You can activate some optimizations by setting WALRUS_OPTIMIZED=1 in your shell
environment.
Release files for django-walrus 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_walrus-0.1.0.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_walrus-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.5 kB
Release files / django_walrus-0.1.0.tar.gz
| Download URL | django_walrus-0.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcaf48f0ce24e8647bab3ddc8fb125d0493555a93a2b44db5e9cae17c82648c1
|
|
BLAKE2b-256 checksum How to use checksums |
3eea0d579084e93575800afe1cfab3e122af28543b55df4704f0acfeae777ac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|
Release files / django_walrus-0.1.0-py3-none-any.whl
| Download URL | django_walrus-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ec7c2052cb1f83d3992ac6bbdf277e9ff2a4246b52b9ce94825f08b5f9b7b966
|
|
BLAKE2b-256 checksum How to use checksums |
722d7f0c74de22dd6365d90bb055b752bd5b4213b2916712168d9c9444867e52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.27.0
|