Coder Social home page Coder Social logo

pombredanne / django-filer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from django-cms/django-filer

1.0 2.0 0.0 2.73 MB

File and Image Management Application for django. NOTICE: update to django-filer 0.8.5 for easy-thumbnails >= 1.0-alpha-17 support.

Home Page: https://github.com/stefanfoulis/django-filer/wiki

License: BSD 3-Clause "New" or "Revised" License

django-filer's Introduction

django-filer

A file management application for django that makes handling of files and images a breeze.

Documentation: http://django-filer.readthedocs.org/en/latest/index.html

Wiki: https://github.com/stefanfoulis/django-filer/wiki

Dependencies

Installation

To get started using django-filer simply install it with pip:

$ pip install django-filer

Add "filer" and "easy_thumbnails" to your project's INSTALLED_APPS setting and run syncdb (or migrate if you're using South).

Configuration

django-filer supports permissions on files. They can be enabled or disabled. Files with disabled permissions are your regular world readable files in MEDIA_ROOT. Files with permissions are a other case however. To be able to check permissions on the file downloads a special view is used and they are saved in a separate location (in a directory called smedia next to MEDIA_ROOT by default).

filer.server.urls needs to be included in the root urls.py:

urlpatterns += patterns('',
    url(r'^', include('filer.server.urls')),
)

By default files with permissions are served directly by django. That is acceptable in a development environment, but very bad for performance in production. See the docs on how to serve files more efficiently.

For automatic subject location aware cropping of images replace easy_thumbnails.processors.scale_and_crop with filer.thumbnail_processors.scale_and_crop_with_subject_location in the THUMBNAIL_PROCESSORS setting:

THUMBNAIL_PROCESSORS = (
    'easy_thumbnails.processors.colorspace',
    'easy_thumbnails.processors.autocrop',
    #'easy_thumbnails.processors.scale_and_crop',
    'filer.thumbnail_processors.scale_and_crop_with_subject_location',
    'easy_thumbnails.processors.filters',
)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.