Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pvl committed Oct 27, 2011
1 parent 6970d7c commit 7c6383b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/index.rst
Expand Up @@ -4,7 +4,7 @@ Welcome to django-filer's documentation!
========================================

``django-filer`` is a file management application for django. It handles uploading
and organizing files and images in contrib.admin.
and organizing files, images and videos in contrib.admin.

.. figure:: _static/directory_view_1_screenshot.png
:scale: 50 %
Expand Down
25 changes: 25 additions & 0 deletions docs/installation.rst
Expand Up @@ -23,6 +23,7 @@ Dependencies
* `PIL`_ 1.1.7 (with JPEG and ZLIB support) I recommend using `Pillow`_ instead.
* `django-staticfiles`_ or ``django.contrib.staticfiles`` with `Django`_ 1.3 is
recommended
* `ffmpeg`_ (recommended for video conversions)

Since the `PIL`_ package on `pypi`_ can be notoriously hard to install on some
platforms it is not listed in the package dependencies in ``setup.py`` and won't
Expand Down Expand Up @@ -100,7 +101,30 @@ To crop an image and respect the subject location::
{% load thumbnails %}
{% thumbnail obj.img 200x300 crop upscale subject_location=obj.img.subject_location %}

video conversion with ffmpeg
............................

If installed ffmpeg is used for conversion of uploaded videos in multiple formats,
resizing of video dimensions and capture of poster image from the video.

The list of accepted video formats for upload is set in the setting bellow. When using
ffmpeg this list should match the formats available for conversion.

FILER_SOURCE_VIDEO_FORMATS = ('mp4', 'avi', 'wmv', 'mov', 'mpg')

With ffmpeg available, when a file is upload it is converted to the formats in the output
formats list.

FILER_VIDEO_FORMATS = ('flv', 'mp4','webm')

By default the videos are converted maintaining the original video dimensions. For each
video, in the admin interface it is possible to choose different dimensions, but if all
videos should be resized to given dimensions, the setting bellow can be used.

FFMPEG_TARGET_DIMENSIONS = "640x480"

Parameters regarding the conversion quality can be adjusted in the setting FFMPEG_CMD, and
parameters for the capture of the poster image can be adjusted in the setting GRABIMG_CMD.

.. _django-filer: https://github.com/stefanfoulis/django-filer/
.. _django-staticfiles: http://pypi.python.org/pypi/django-staticfiles/
Expand All @@ -114,3 +138,4 @@ To crop an image and respect the subject location::
.. _Pillow: http://pypi.python.org/pypi/Pillow/
.. _pip: http://pypi.python.org/pypi/pip
.. _South: http://south.aeracode.org/
.. _ffmpeg: http://ffmpeg.org/
15 changes: 12 additions & 3 deletions docs/usage.rst
Expand Up @@ -67,18 +67,27 @@ templates
{% load thumbnails %}
{% thumbnail company.logo 250x250 crop %}

A template tag is also provided to display videos with the multiple available
formats.

{% load filer_video_tags %}
{% filer_video video_obj %}

This will generate the html5 video tag with links to the multiple video formats
and fallback to flash if the flash format is available.

admin
.....

The default widget provides a popup file selector that also directly supports
uploading new images.
uploading new images and new videos.

.. figure:: _static/default_admin_file_widget.png
:alt: FileField widget in admin

* Clicking on the magnifying glass will display the file selction popup.
* Clicking on the magnifying glass will display the file selection popup.

* The red X will de-select the currently selected file (usefull if the field
* The red X will de-select the currently selected file (useful if the field
can be ``null``).

.. WARNING::
Expand Down

0 comments on commit 7c6383b

Please sign in to comment.