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
Wagtail 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 😎
Contributing
Contributions are welcome, please see our contributing guide for more details.
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
Hashes for wagtailmakeup-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a65a34a4d56de0065afca10fe7dbfeb68dc535ef2f4e5b733cf3f675dfbe23d |
|
MD5 | 61b1c71fe158fb96f42773f66e0dc1cd |
|
BLAKE2b-256 | cb5e7842239ffc4dd35c51b4ecd1a923b987a50f1e195d94a74987d71c87384b |