Giter Club home page Giter Club logo

django-filer's Introduction

Django Filer

pypi python django coverage

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

Note

This project is endorsed by the django CMS Association. That means that it is officially accepted by the dCA as being in line with our roadmap vision and development/plugin policy. Join us on Slack.

https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/filer_2.png https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/filer_3.png
https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/detail_image.png https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/detail_file.png
https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/file_picker_1.png https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/file_picker_3.png

Contribute to this project and win rewards

Because this is a an open-source project, we welcome everyone to get involved in the project and receive a reward for their contribution. Become part of a fantastic community and help us make django CMS the best CMS in the world.

We'll be delighted to receive your feedback in the form of issues and pull requests. Before submitting your pull request, please review our contribution guidelines.

We're grateful to all contributors who have helped create and maintain this package. Contributors are listed at the contributors section.

Documentation

Please head over to the separate documentation for all the details on how to install, configure and use django-filer.

django-filer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-filer's Issues

FilerImageField problem with Stacked Inline in the admin

When using a FilerImageField in a stacked inline in the admin, when you select the 'Add another..." button to get another inline the FilerImageField will no longer work.

When you select your image, the pop-up flickers and I get the following js error:

document.getElementById(img_name) is null
[Break On This Error] document.getElementById(img_name).src = chosenThumbnailUrl;
Line: 12 popup_handling.js

I'm running the following:
django==1.2.5
django-cms==2.1.3
django-filer==0.8.2

directory_listing.html "change" link broken

Looks like there might be a typo in this file on line 64:
filer/templates/admin/filer/folder/directory_listing.html

Originally:

<span class="small quiet">({% blocktrans count folder.children_count as counter %}1 folder{% plural %}{{ counter }} folders{% endblocktrans %}, {% blocktrans count folder.file_count as counter %}1 file{% plural %}{{ counter }} files{% endblocktrans %})</span>

Changed to:

<span>{% if is_popup %}{% else %}<a style="display: block; float: right;" class="changelink" href="{% url admin:index %}filer/folder/{{ folder.id }}/" title="{% trans "Change current folder details" %}">{% trans "Change" %}</a>{% endif %}</span>

Seemed to fix the link problem i had.

Mixing images and files

It seems like django-filer tries to separate images and other files, but it does not really succeed. For example, in main folder list there is a count of images, but if I open a folder, it counts images. In both cases it displays the same number and it is a number of all files. But as it seems from this error:

https://github.com/stefanfoulis/cmsplugin-filer/issues/#issue/11

There is some notion of difference between files and images? So it would be possible to display count for both images and files?

Permission checks for Downloads

Prevent certain files from being downloadable if you don't have permissions.
This could be implemented with the "x-sendfile" header for most hosting situations. While in development files can be served directly by the development server.
Public files could be served separately without going through the django app for performance.

Better Clipboard integration

Files should be displayed grayed out in the folder view of they are in the clipboard (and not removed from the folder as soon as they are added to the clipboard)

os.path.normpath breaking filer_staticmedia_prefix at al.

In filer/settings.py, several variables such as FILER_STATICMEDIA_PREFIX are being defined and run through os.path.normpath() at the last step. Where settings such as settings.MEDIA_URL are absolute urls, i.e. starting with 'http://' (as they are welcome to do, and is recommended for separate media servers), normpath() collapses 'http://' to 'http:/', breaking the link.

make files replaceable

allow replacing a file with a new version. that way all apps that link to the file instantly have the new version.

Non-standard media directory causes Image thumbnail to fail

In imagemodels.py, the following lines require "hard-coding" the media directory to be /media:

def rel_image_url(self):
    'return the image url relative to MEDIA_URL'
    try:
        rel_url = u"%s" % self._file.url
        if rel_url.startswith('/media/'):
            before, match, rel_url = rel_url.partition('/media/')
        return rel_url

If you wish to use a different format, eg: /site_media/media (as Pinax does), then this code renders <img src=""> instead of the actual URL.

Might I suggest that since the description states: 'return the image url relative to MEDIA_URL', that the function actually use settings.MEDIA_URL?

clean up popup for inserting files

  • one clear "insert" link (no more clicking on title or thumb to insert)
  • allow change_view of image in popup (needs clean popup propagation)

Incompatible with windows / breaks with MEDIA_URL containing a full URL

When running on Windows, the "upload" button does not appears.
The reason is wrong code in settings.py

FILER_STATICMEDIA_PREFIX = os.path.normpath( getattr(settings, 'FILER_STATICMEDIA_PREFIX', os.path.join(settings.MEDIA_URL,'filer/') ) ) + '/'

On windows delimiter of path is ''. And now on Windows this code generates url like \media\uploads/filer/

I think there shouldn't be os.path functions at all or they should be wrapped by urllib.pathname2url

Another symptom of this was reported by @hipikat in #60:
In filer/settings.py, several variables such as FILER_STATICMEDIA_PREFIX are being defined and run through os.path.normpath() at the last step. Where settings such as settings.MEDIA_URL are absolute urls, i.e. starting with 'http://' (as they are welcome to do, and is recommended for separate media servers), normpath() collapses 'http://' to 'http:/', breaking the link.

add collections

collections are lists of files that can be created in admin and can be used by other apps. e.g for a slideshow or download list.
collections should be dynamic. e.g add all images that are in folder X these two files and all files that have tag Y.

Template problem

Having a harsh time trying to install this app. There are no instructions that I can find.
I cloned from git, did a setup and added 'filer' to my INSTALLED_APPS. Managed to run syncdb okay. All seems fine.
When I go into admin, I see the "Image Filer" section. I can go into "Folder permissions", but not anywhere else.

Here's the error message I get. Will hack further, but have little time.

TemplateDoesNotExist at /admin/image_filer/folder/

image_filer/directory_listing.html

Request Method: GET
Request URL: http://ddm.cms/admin/image_filer/folder/
Django Version: 1.2.1
Exception Type: TemplateDoesNotExist
Exception Value:

image_filer/directory_listing.html

Exception Location: /usr/local/lib/python2.6/dist-packages/django/template/loader.py in find_template, line 138
Python Executable: /usr/bin/python
Python Version: 2.6.4
Python Path: ['/usr/local/lib/python2.6/dist-packages/django_cms-2.1.0.beta3-py2.6.egg', ... '/usr/local/lib/python2.6/dist-packages']
Template-loader postmortem

Django tried loading these templates, in this order:

* Using loader django.template.loaders.filesystem.Loader:
* Using loader django.template.loaders.app_directories.Loader: 

Upload not working with Django 1.2.5

I've got django-filer up and running with Django 1.2.4, but with Django 1.2.5. files won't show up in the clipboard. An error is displayed in the clipboard instead: "upload failed". So I cannot assign uploaded files to any folder.

Although files are uploaded to the file system and written into the folder "filer_private".

Focal point bug with tall images

Apologies if this has already been fixed - I'm using an older version, but I haven't seen any reference to this, so maybe it's still an issue.

If the image is square or wide, then the focal point works well. If the image is taller than it is wide, though, what happens is that values generated by the focal point tool are incorrect by height/width.

So if the image is 2000x3000, the values will be divided by 1.5.

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.