Django middleware for when you want your fonts to get freaky.
Project description
Freaky Funky Fonts Middleware (Django)
For when you feel the funk that freaks you fonts
What it this?
Freaky Funky Fonts Middleware is essentially a Django “font chaos” middleware package with configurable behaviour.
It intercespts the html of Djangos reponses
Usage
- Install the package
- Apply the middleare in your Django project settings as middleare
- (Optional but recommended) Configure in your
freakyfunkyfonts.toml(or.inifor versions before python 3.11)
Installing
Applying
In the project settings
MIDDLEWARE = [
# ...
"freakyfunkyfonts.middleware.FunkyFontMiddleware",
]
Configs
Example:
[fonts]
# List of fonts to cycle through
pool = [
"Times New Roman",
"Georgia",
"Merriweather",
"Lora"
]
[inject]
# Extra tags to inject into <head> (Like a link tag to google fonts)
# More than one tag can be applied, just append to the list
# Make sure that the fonts in the pool are convered
tags = [
'<link href="https://fonts.googleapis.com/css2?family=Merriweather&family=Lora&display=swap" rel="stylesheet">'
]
[behaviour]
# HTML tags to skip completely
skip_tags = ["script", "style", "noscript", "title"]
Dev
Installing
pip install -e .
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
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 django_freakyfunkyfonts-1.0.0.tar.gz.
File metadata
- Download URL: django_freakyfunkyfonts-1.0.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a68f26e8bad90a46b63eaf142d4d6fd226246c78a2d1e3c11eba4f8200c03f2
|
|
| MD5 |
779c6c72e57c1c5f24db61de1f667b5f
|
|
| BLAKE2b-256 |
89d40f8c0f0079aadd31f126af0f7fb82708dfb2aab208560bd4d2122699457e
|
File details
Details for the file django_freakyfunkyfonts-1.0.0-py3-none-any.whl.
File metadata
- Download URL: django_freakyfunkyfonts-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7fb3874d6505af19cb0c7ed49ae2bdee0150c69a57fea398f74a73da8154746
|
|
| MD5 |
a3599eb53be33141ebf91dc46d39eaa8
|
|
| BLAKE2b-256 |
a0d7f220206e304fb839a8b0c42014e8bf84e4c102a4a3d4f5eb456ab48f70c3
|