Skip to main content
https://img.shields.io/travis/rerb/django-fortune.svg https://img.shields.io/codecov/c/github/rerb/django-fortune.svg https://img.shields.io/pypi/v/django-fortune.svg https://img.shields.io/pypi/pyversions/django-fortune.svg https://img.shields.io/pypi/status/django-fortune.svg

django-fortune

A Django template-tag that provides a fortune.

The Template Tag

{% load fortune_tags %}
{% fortune %}

The Management Commands

$ python manage.py fortune  # Get a fortune.
Fortunes will improve after loading some.  # Oops, no fortunes loaded.
$ python manage.py fortune_list_packs  # List available fortune packs.
-- Installed: --
-- Available: --
art
ascii-art
computers
cookie
definitions
.
.
$ python manage.py fortune_load_pack art  # Load art fortunes.
$ python manage.py fortune  # Get an art fortune.

"My life is a soap opera, but who has the rights?"
        -- Madame
$ python manage.py fortune_unload_pack art  # Unload art fortunes.
$ python manage.py fortune  # No fortunes available again. :-(
Fortunes will improve after loading some.
$

The Python Interface

$ python manage.py shell
.
.
>>> from fortune.models import Fortune, Pack
>>> Fortune.fortune()
'Fortunes will improve after loading some.'
>>> from fortune import utils
>>> fortunes_path = utils.get_fortunes_path()
>>> art_fortunes_path = fortunes.path.joinpath("art")
>>> Pack.load(str(art_fortunes_path))
>>> Fortune.fortune()
u"\nThey can't stop us... we're on a mission from God!\n\t\t-- The Blues Brother"
>>> art_fortunes = Pack.objects.get(name="art".title())
>>> art_fortunes.unload()
>>> Fortune.fortune()
'Fortunes will improve after loading some.'
>>>

Installation

Install using pip;

$ pip install django-fortune

then add “fortune” to INSTALLED_APPS in your app’s settings.py.

Metadata

Release files for django-fortune 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-fortune 1.1.1
File Size Uploaded Provenance Actions
django-fortune-1.1.1.tar.gz 1.0 MB Without provenance Details for django-fortune-1.1.1.tar.gz

Release files / django-fortune-1.1.1.tar.gz

Download URL django-fortune-1.1.1.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
c9cb8c8538a69fc87b13fd17b6787a57f24fd6fa89748ab5357f4a6a949697f5
BLAKE2b-256 checksum
How to use checksums
afc626aa8b536d0dfc7cfe9eb869984e5b90fbfe7ee79579b9ff3e15021e2c83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-fortune 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page