Note that there are some explanatory texts on larger screens.

plurals
  1. POdjango-uploadify http error 500 after upload
    primarykey
    data
    text
    <h2>Used technologies</h2> <ul> <li><a href="https://github.com/tstone/django-uploadify" rel="nofollow">django-uploadify</a> (multiple file upload)</li> <li>Django 1.3 testing web server</li> </ul> <h2>Context</h2> <p>I can upload successfully files to the web server using the upload.html page (the upload directory has the required permissions). However, when the upload is completed, the web server returns a HTTP 500 error.</p> <pre><code>"POST /filemanager/view HTTP/1.1" 500 68788 </code></pre> <p>The <em>/filemanager/view</em> page render correctly if I access it directly (GET).</p> <h2>Code</h2> <p><strong>filemanager/urls.py</strong></p> <pre class="lang-py prettyprint-override"><code>urlpatterns = patterns('filemanager.views', url(r'^upload/', direct_to_template, {'template': 'upload.html'}), url(r'^view/', ListView.as_view( queryset = Container.objects.all(), context_object_name='containers', template_name='view.html'), name='view' ) ) </code></pre> <p><strong>filemanager/templates/upload.html</strong></p> <pre class="lang-html prettyprint-override"><code>{% load uploadify_tags %} {% load url from future %} &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="{{ MEDIA_URL }}/js/uploadify/jquery-1.4.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="{{ MEDIA_URL }}/js/uploadify/swfobject.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="{{ MEDIA_URL }}/js/uploadify/jquery.uploadify.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; {% multi_file_upload '/filemanager/view' %} &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>filemanager/templates/view.html</strong></p> <pre class="lang-html prettyprint-override"><code>&lt;html&gt; &lt;h1&gt;File list&lt;/h1&gt; &lt;ul&gt; {% if containers %} {% for container in containers %} &lt;li&gt;{{ container.file }}&lt;/li&gt; {% endfor %} {% endif %} &lt;/ul&gt; &lt;/html&gt; </code></pre> <p>Is it possible that the Django testing web server is buggy while performing this type of operation? Suggestions?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload