Admin interface for editing thumbnail aliases
Project description
[![Build Status](https://travis-ci.org/Apkawa/django-multitype-file-field.svg?branch=master)](https://travis-ci.org/Apkawa/easy-thumbnails-admin)
[![Requirements Status](https://requires.io/github/Apkawa/django-multitype-file-field/requirements.svg?branch=master)](https://requires.io/github/Apkawa/easy-thumbnails-admin/requirements/?branch=master)
[![PyPI](https://img.shields.io/pypi/pyversions/easy-thumbnails-admin.svg)]()
# Install
```bash
pip install easy-thumbnails-admin
```
1. Append into `INSTALLED_APPS` settings before `easy-thumbnails` like:
```python
INSTALLED_APPS = [
# ...
'easy_thumbnails_admin',
'easy_thumbnails',
'easy_thumbnails.optimize',
# ...
]
```
2. Configure `THUMBNAIL_ALIASES` like here. Add `admin`.`help_text` if needed.
```python
THUMBNAIL_ALIASES = {
'example_app.Article.poster': {
'small': {
'size': (100, 100), 'crop': 'smart',
# Here there
'admin': {
"help_text": "Small thumbnail, showed on article list"
},
},
'medium': {
'size': (300, 200), 'crop': 'smart',
# And here
'admin': {
'help_text': 'A generic thumbnail'
}
}
}
}
```
## Usage
This library patched all fields with `ThumbnailField`.
1. Click on preview or link at field in admin
![Build Status](docs/screenshots/initial.png)
2. Aliases list
![Build Status](docs/screenshots/thumbnail_list.png)
3. Edit alias
![Build Status](docs/screenshots/edit_thumbnail_alias.png)
# Contribute
## Run examples
```bash
# virtualenvwrapper
mkvirtualenv eta
workon eta
./tests/manage.py migrate
./tests/manage.py runserver
```
## frontend
```bash
yarn # or npm
yarn watch
yarn build # for release
```
[![Requirements Status](https://requires.io/github/Apkawa/django-multitype-file-field/requirements.svg?branch=master)](https://requires.io/github/Apkawa/easy-thumbnails-admin/requirements/?branch=master)
[![PyPI](https://img.shields.io/pypi/pyversions/easy-thumbnails-admin.svg)]()
# Install
```bash
pip install easy-thumbnails-admin
```
1. Append into `INSTALLED_APPS` settings before `easy-thumbnails` like:
```python
INSTALLED_APPS = [
# ...
'easy_thumbnails_admin',
'easy_thumbnails',
'easy_thumbnails.optimize',
# ...
]
```
2. Configure `THUMBNAIL_ALIASES` like here. Add `admin`.`help_text` if needed.
```python
THUMBNAIL_ALIASES = {
'example_app.Article.poster': {
'small': {
'size': (100, 100), 'crop': 'smart',
# Here there
'admin': {
"help_text": "Small thumbnail, showed on article list"
},
},
'medium': {
'size': (300, 200), 'crop': 'smart',
# And here
'admin': {
'help_text': 'A generic thumbnail'
}
}
}
}
```
## Usage
This library patched all fields with `ThumbnailField`.
1. Click on preview or link at field in admin
![Build Status](docs/screenshots/initial.png)
2. Aliases list
![Build Status](docs/screenshots/thumbnail_list.png)
3. Edit alias
![Build Status](docs/screenshots/edit_thumbnail_alias.png)
# Contribute
## Run examples
```bash
# virtualenvwrapper
mkvirtualenv eta
workon eta
./tests/manage.py migrate
./tests/manage.py runserver
```
## frontend
```bash
yarn # or npm
yarn watch
yarn build # for release
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for easy-thumbnails-admin-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfe830076d6816233beee7e39c70ccad885a3a59f1d17e4b4f4bad0953cb0362 |
|
MD5 | ae7663b1b01a82c8ccc895f7ee5115c6 |
|
BLAKE2b-256 | bf5447683d10135837e6bda0a195f9a0cac7ed5561bfc606168dfd7380a4d705 |