garmoncheg / django_multiuploader_example_usage Goto Github PK
View Code? Open in Web Editor NEWUsage example for repo of the plugin django_multiuploader by me
Home Page: http://garmoncheg.blogspot.com/
Usage example for repo of the plugin django_multiuploader by me
Home Page: http://garmoncheg.blogspot.com/
Hi Lurii.. You some kinda magician!!!
Is there a way we can generate a temporary url for uploaded files, and share it with others?? If so kindly let this newbie know how..
temporary url(in the sense that it stays alive only for a limited time)
Thanks :)
ImportError at /
No module named django_multiuploader_exaple_usage.urls
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.3
Exception Type: ImportError
Exception Value:
No module named django_multiuploader_exaple_usage.urls
Exception Location: /usr/local/lib/python2.7/dist-packages/django/utils/importlib.py in import_module, line 35
Python Executable: /usr/bin/python
Python Version: 2.7.1
Python Path:
['/home/jennifer/project/project',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/pymodules/python2.7/gtk-2.0',
'/usr/lib/python2.7/dist-packages/gst-0.10',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/pymodules/python2.7/ubuntuone-client',
'/usr/lib/pymodules/python2.7/ubuntuone-storage-protocol',
'/usr/lib/pymodules/python2.7/ubuntuone-control-panel']
Server time: Thu, 22 Sep 2011 22:10:56 -0500
Hi
Thanks for writing this example with Django. How would you change the code if you need to add a 'description' field for each file that you upload. I changed the upload template to have
<tr class="template-upload{{if error}} ui-state-error{{/if}}">
<td class="preview"></td>
<td class="name">${name}</td>
<td class="size">${sizef}</td>
{{if error}}
<td class="error" colspan="2">Error:
{{if error === 'maxFileSize'}}File is too big
{{else error === 'minFileSize'}}File is too small
{{else error === 'acceptFileTypes'}}Filetype not allowed
{{else error === 'maxNumberOfFiles'}}Max number of files exceeded
{{else}}${error}
{{/if}}
</td>
{{else}}
<td><input type="text" name="description"/></td>
<td class="progress"><div></div></td>
<td class="start"><button>Start</button></td>
{{/if}}
<td class="cancel"><button>Cancel</button></td>
</tr>
The field renders correctly with each file row but the POST data that reaches the server never contains the additional field.
I read the jquery-file-upload docs and found out about formData but could not figure out how to initialize it with different data for each row (file).
Any help will be appreciated.
Jai
I tried to look for the variable acceptFileTypes
in the jquery.fileupload.ui.js
file but could not get it that how we can mention it to accept the videos file as well
I'm trying to use App Engine datastore.
I had success deploying and it works until I try to upload, an error message shows in server log:
ValueError: The App Engine storage backend only supports BlobstoreFile instances or File instances whose file attribute is a BlobstoreFile.
I believe that the error is because in models.py it uses django's model class, which is models.FileField, but AppEngine requires db.BlobProperty().
Any idea of how to fix it?
Using the csrf_exempt decorator opens up these views to potential security issues, and Django's CSRF protection can be easily used with AJAX requests. I've got it up and running right now, all I had to do was also include this file in my scripts:
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.