Skip to main content

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

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

django-filepreviewfields-0.1.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page