tnd / django-files-widget Goto Github PK
View Code? Open in Web Editor NEWDjango AJAX upload widget and model field for multiple files or images, featuring drag & drop uploading, upload progress bar, sortable image gallery
License: Other
Django AJAX upload widget and model field for multiple files or images, featuring drag & drop uploading, upload progress bar, sortable image gallery
License: Other
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 ?
Подскажите как сжать загруженные изображения, удалить исходник?
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?
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
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
Uncaught TypeError: Object [object Object] has no method 'prepopulate'
I can't found example this github repository here.
Hello, after install the plugin on django 1.7, i have two issues:
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')),
)
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'
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!
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.
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:
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...
Can't migrate with Django 1.7:
Cannot resolve bases for ModelState: 'files_widget.GlobalPermission'
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!
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!
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.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.