Fields for previewing image and video uploaded files
Project description
django-filepreviewfields
========================
> Fields for previewing image and video uploaded files
Installation
------------
```sh
pip install django-filepreviewfields
```
Adding to installed apps
------------------------
- To use file preview fields, you have to add it to your INSTALLED_APPS on your project's settings.py so the needed static files can be loaded:
```python
INSTALLED_APPS = (
...
'filepreviewfields',
)
```
Using SortedManyToManyField
---------------------------
- To use SortedManyToMany field, just create a field as if you were adding the default ManyToMany
```python
from django.db import models
from filepreviewfields.fields import ImagePreviewField, VideoPreviewField
class Movie(models.Model):
...
cover = ImagePreviewField()
video = VideoPreviewField()
```
License
-------
MIT
========================
> Fields for previewing image and video uploaded files
Installation
------------
```sh
pip install django-filepreviewfields
```
Adding to installed apps
------------------------
- To use file preview fields, you have to add it to your INSTALLED_APPS on your project's settings.py so the needed static files can be loaded:
```python
INSTALLED_APPS = (
...
'filepreviewfields',
)
```
Using SortedManyToManyField
---------------------------
- To use SortedManyToMany field, just create a field as if you were adding the default ManyToMany
```python
from django.db import models
from filepreviewfields.fields import ImagePreviewField, VideoPreviewField
class Movie(models.Model):
...
cover = ImagePreviewField()
video = VideoPreviewField()
```
License
-------
MIT
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 django-filepreviewfields-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c5776eaf772983670885c52414a8a7758e1c67464140d447ca45fa912102fd1 |
|
MD5 | ae86757366a5471befd69d9edbb65d8a |
|
BLAKE2b-256 | 724df03abe7dffc81425a53289d545ebc4c67388fea87756c78e2a91517c95dc |