#4165: Upload Progress Middleware and Integration into the Admin
---------------------------------------------+------------------------------
   Reporter:  Michael Axiak <[EMAIL PROTECTED]>  |                Owner:  
adrian                
     Status:  new                            |            Component:  Admin 
interface       
    Version:  SVN                            |           Resolution:            
            
   Keywords:  upload, progress, ajax         |                Stage:  Design 
decision needed
  Has_patch:  1                              |           Needs_docs:  1         
            
Needs_tests:  1                              |   Needs_better_patch:  1         
            
---------------------------------------------+------------------------------
Comment (by Michael Axiak <[EMAIL PROTECTED]>):

 '''A new version''' has been uploaded, making a few changes over the last
 version:
   * The !JavaScript will now infer the path of Admin for you. (You can
 even make admin the root of the domain...)
 
   * Removed {{{upload_progress}} portions of middleware...now using
 {{{process_request}}}
 
   * Raises error whenever client asks for data that's not asked for. This
 signals the !JavaScript to silently fail (and Stop!) after 10 tries.
 
   * Tested / tweaked for different edge cases regarding what users will
 have set.
 
   * Included a missing {{{__init__.py}}} file.
 
 '''INSTALLATION'''
 
 The above docs don't really work. Here's a revised version.
 
 
 1. Add #2070 to your source tree
 
 2. Add the latest patch (of this ticket) to your source tree.
 
 3. Setup your middleware/models to track file progress.
 
 4. Set {{{FILE_UPLOAD_DIR}}} to a writable folder in your
 {{{settings.py}}} file.
 
 For (3), there are two options that come in the patch (as uploadprogress
 contrib):
 
     * {{{FileProgressCached}}} -- uses the cache framework for quicker
 ajax (will NOT work if your cache framework doesn't)
     * {{{FileProgressDB}}} -- uses Database models
 
 Depending on what you choose, continue below.
 
 '''!FileProgressCached'''
 
 To enable this, add
 {{{'django.contrib.uploadprogress.middleware.FileProgressCached'}}} to
 your {{{MIDDLEWARE_CLASSES}}}.
 
 '''FileProgressDB'''
 
 To enable this:
 
     * Add {{{'django.contrib.uploadprogress.middleware.FileProgressDB'}}}
 to your {{{MIDDLEWARE_CLASSES}}}.
     * Add {{{'django.contrib.uploadprogress'}}} to your
 {{{INSTALLED_APPS}}}.
     * Issue a {{{./manage.py syncdb}}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4165#comment:15>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to