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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a3022417dbe2c03d0659f44930b5a179593bb730d758ef17044d9ac09db6523 |
|
MD5 | af77e2a5328e116e15113645bebfdfc1 |
|
BLAKE2b-256 | 2d874507fa638c9365074c1dec3abdad7fb91e3505af4dd6e296ba3084154878 |