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
File details
Details for the file django-filepreviewfields-0.1.2.tar.gz
.
File metadata
- Download URL: django-filepreviewfields-0.1.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
acefa28c8328d6da6692c665112b9e773f2976317b70d41e95c69308c7d1a617
|
|
MD5 |
1eb702afb8be011644954470be284ec2
|
|
BLAKE2b-256 |
91c880d6ad296002c51b1a128811cf2af25c21ce416a2154a02425a005b93243
|