GithubHelp home page GithubHelp logo

django-cms / django-filer Goto Github PK

View Code? Open in Web Editor NEW
1.7K 56.0 569.0 10.71 MB

File and Image Management Application for django

Home Page: https://django-filer.readthedocs.io/

License: Other

Python 62.54% JavaScript 9.74% HTML 13.51% SCSS 14.20% CSS 0.01%
addon cms python django django-cms

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.

image image
image image
image image

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

Contributors

acatton avatar belimawr avatar croepha avatar czpython avatar darbula avatar dylanncordel avatar finalangel avatar flight avatar fsbraun avatar jrief avatar jvamvas avatar kux avatar lory87 avatar marksweb avatar mattbriancon avatar mikek avatar mitar avatar mkoistinen avatar mmahnic avatar neoascetic avatar pre-commit-ci[bot] avatar skirsdeda avatar stefanfoulis avatar timgraham avatar vinitkumar avatar vstoykov avatar vthaian avatar vxsx avatar yakky avatar yml avatar

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

django-filer's Issues

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.

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: 

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?

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)

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

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.

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.

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.

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".

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)

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.

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?

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.

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.