Wagtail Makeup
Project description
Wagtail Makeup
Tired of having no images locally when you need them? Don't want to fill your computer up with images? Use Wagtail Makeup ;)
Installation
Wagail makeup depends on python unsplash:
pip install python-unsplash wagtailmakeup
Configuration
Sign up for an Unsplash api key and add this to your settings:
# settings.py
WAGTAIL_UNSPLASH = {
"CLIENT_ID": "",
"CLIENT_SECRET": ""
}
The API is rate limited to 50 request/hour... you can apply for a higher rate limit.
Using
You probably don't want this in your production settings, so add the following to you local.py settings:
INSTALLED_APPS.append('wagtailmakeup')
Wagtail Makeup works by providing a new management command:
python manage.py make_up [search query] [amount of images]
So you want to replace all your broken images on your site with dogs (who wouldn't) you can do it like this:
python manage.py make_up dogs 10
Note: the amount value is the number of images to download, the higher this is, the more variance you will get.
:cool:
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
File details
Details for the file wagtailmakeup-0.0.3.tar.gz
.
File metadata
- Download URL: wagtailmakeup-0.0.3.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 110c986133aeb16bfe35464d8e7dfd3e48f6db62e4d979cc41996542421d763a |
|
MD5 | 46c2bcf240d3d78c6f040ebe501f43b0 |
|
BLAKE2b-256 | f8e4c2e9a454253006bd7ca3f5ef4f6fd263af44242ae6661df7c05b3524eb60 |
Provenance
File details
Details for the file wagtailmakeup-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: wagtailmakeup-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73d78bdb276c1f7a6367553eb3c7f60fc19b286ace316ee0732ff090870e5925 |
|
MD5 | a3670182050799afd1cb7d959054f6df |
|
BLAKE2b-256 | afc222413107446f04b9259f96249361e86d15cd2c09d806ca2998dde252507f |