Coder Social home page Coder Social logo

tnd / django-files-widget Goto Github PK

View Code? Open in Web Editor NEW
89.0 89.0 52.0 1.21 MB

Django AJAX upload widget and model field for multiple files or images, featuring drag & drop uploading, upload progress bar, sortable image gallery

License: Other

Python 50.45% CSS 5.81% JavaScript 37.97% HTML 5.77%

django-files-widget's People

Contributors

altimore avatar cericoda avatar maartenth avatar mionch avatar otstanteplz avatar yihuang 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

Watchers

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

django-files-widget's Issues

No progress

Hi, I have small problem. File not upload. No seen progress :/ All time I have this :
no_progress
Please help me. I notice problem in js.. Screen:
no_progress2

What I do wrong.. ?

Sort with a mathematical function

i have a folder with images with number, and i would like to delete some images in this folder according a mathematical function , is it possible ?

Images get not moved to FILES_DIR

If I Upload images with the ImageField, the image is not moved to the final directory, instead they stay in the temp folder. Is there some configuration required to make this work or should this work out of the box?

Need the descriptions all of images.

Hi,
I need to add the descriptions of all the added files to filesWidget plugins.
I have a big problem how i can do it?

Do u have a solve the problem?

I would like to do a 'input' area under the images where I can write the descriptions photo's.

can u help me ?

Filip

UnicodeDecodeError when trying to save files with special characters

Hello,

couple months ago I was trying to figure out a problem when saving a files with special characters in the filename. For example this image file obj = u'temp/files_widget/2016-05-31-15-00/1/Sn\xedmek obrazovky po\u0159\xedzen\xfd 2016-05-23 10-34-59.png' can't be saved.

The whole problem is described in SO here: http://stackoverflow.com/questions/37547513/storing-unicode-subclasses-to-mysql-with-django

Now I getting back to this issue. Maybe somebody of you have already fix this. If will be necessary, then I will copy all information from SO here.

Thank you for any advice.
Truhlik

Im getting Page not found (404) /en/files-widget/upload/

Hello, after install the plugin on django 1.7, i have two issues:

  1. in the admin page the field appear in my model with the class hidden
  2. when i try to upload a image i get POST http://localhost:8000/en/files-widget/upload/ 500 (INTERNAL SERVER ERROR)

i double check the urls file, this is my conf
urlpatterns = i18n_patterns('',
url(r'^files-widget/', include('topnotchdev.files_widget.urls')),
url(r'^accounts/', include('allauth.urls')),
url(r'^restaurants/', include('restaurants.urls')),
url(r'^types/', include('restaurant_product_types.urls')),
url(r'^admin/', include(admin.site.urls)), # NOQA
url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap',
{'sitemaps': {'cmspages': CMSSitemap}}),
url(r'^select2/', include('django_select2.urls')),
url(r'^', include('cms.urls')),
)

ImportError: No module named 'fields'

Can anyone help me with this issues? I thank everyone's attention

Traceback (most recent call last):
File "/home/abelha/python/websys/lib/python3.4/site-packages/django/apps/config.py", line 114, in create
cls = getattr(mod, cls_name)
AttributeError: 'module' object has no attribute 'files_widget'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/home/abelha/python/websys/lib/python3.4/site-packages/django/core/management/init.py", line 351, in execute_from_command_line
utility.execute()
File "/home/abelha/python/websys/lib/python3.4/site-packages/django/core/management/init.py", line 325, in execute
django.setup()
File "/home/abelha/python/websys/lib/python3.4/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/abelha/python/websys/lib/python3.4/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/abelha/python/websys/lib/python3.4/site-packages/django/apps/config.py", line 119, in
create
import_module(entry)
File "/home/abelha/python/websys/lib/python3.4/importlib/init.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 2254, in _gcd_import
File "", line 2237, in _find_and_load
File "", line 2226, in _find_and_load_unlocked
File "", line 1200, in _load_unlocked
File "", line 1129, in _exec
File "", line 1471, in exec_module
File "", line 321, in _call_with_frames_removed
File "/home/abelha/python/websys/lib/python3.4/site-packages/topnotchdev/files_widget/init.py", line 1, in
from fields import FileField, FilesField, ImageField, ImagesField
ImportError: No module named 'fields'

Support to Django >= 1.9

Hello everyone,

Recently i start migrate my Django 1.8 projects to >= 1.9 and the 'django-files-widget' doesn't work for these versions.

So I forked this project and make title changes to work on Django >= 1.9 projects, the code is on https://github.com/AlexVFornazieri/django-files-widget

Is works for the used in my projects, but has much to be tested yet.

From what I've seen, this project has last updated for some time, but I find it a great addition to Django-admin. I hope you can join me and help continue the project.

I think doing a 'pull request' not is interesting as it can cause problems for those who have this repository in the dependency file in Django projects <= 1.8. Maybe just add a link to readme.md to the version that supports newer projects in Django (my fork).

I thanks everybody attention, let's go contribute!

FileFields support

This is not really an issue, but couldn't think of where this might go; does the app as is (checked out) support filefields?

The docs say not but the models, fields are there in the source code...

Thanks.

URL images

Hi many thanks for your handy tool.

Not sure where I went wrong but when I use the paste a URL feature, I get a problem when rendering the URL, because it's escaped, I get a URL that looks like this:

http://192.168.74.128:8000/media/http://sbmedia.sbdesignsquare.com/cyber/images/mat/19057985_NMI200527-IT-FRENCH%20PROVENCE-Livingroom-INT2296-Coffee%20Table-Luxury%20Glamorous_A_A2.jpg

This applies for me in admin as well.

I've worked around it in a template like so:

 <a href="
  {% if img.exists %}
              {{ img.url }}
            {% else %}
              {{ img.local_path }}
            {% endif %}">
            <img src="{{ img.thumbnail_64x64.url }}" /></a>

TBH I would prefer it if URL images are downloaded, bypassing this issue - is this a feature you are thinking about adding at some point, or can you advise what I would need to do to achieve this? even if it was done manually by a management command it might save the possibility of losing the image at some point in the future...

TemplateSyntaxError: 'thumbnail' tag received a bad argument: 'format'

Hi, I'm using files-widget and I have an 500 error with the image upload.
The error occurs in line 53 of views.py:
'thumbnailPath': render_to_string('files_widget/includes/thumbnail.html', locals()),

This line returns TemplateSyntaxError, it seems an problem with sorl-thumbnail:
TemplateSyntaxError: 'thumbnail' tag received a bad argument: 'format'
Can anyone help me with this error?

Thanks!

Works only with a super user account

I created my modules using a Django File Widget for create a imagens upload system for a gallery in Django Admin, everything works fine as superuser, but using a simple account, same with all conceded permissions, the files not is uploaded, just the thumbnail with progress bar show up.

I need fix it, how?

Thanks all for help!

Can not show thumbnails when deploy on linux

Problem in files_widget/views.py

    return HttpResponse(json.dumps({
        'success': True,
        'imagePath': path_to_file,
        'thumbnailPath': render_to_string('files_widget/includes/thumbnail.html', locals()),
    }))

render_to_string('files_widget/includes/thumbnail.html', locals())

return u'' on ubuntu 14.04 but working on windows 7 x64.

I am using pycharm remote debuging, though it can not debug into sorl.thumbnail(pydev debugger: warning: trying to add breakpoint to file that does not exist: /root/d:/python27/lib/site-packages/sorl_thumbnail-12.2-py2.7.egg/sorl/thumbnail/templatetags/thumbnail.py (will have no effect)).
So I don't know what cause this problem, please check it.

Maintainer wanted

I'm not using Django any more for a few years now, and I see that many developers still use this library. That's why I'm looking for a maintainer. There are 37 forks with new features, bugfixes or compatibility with newer versions of Django. I hope that a maintainer of one of those forks, or someone else, wants to merge some of them back and test it thoroughly.

Thank you in advance!

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.