#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               |                Stage:  
Unreviewed     
  Has_patch:  1                              |           Needs_docs:  1         
     
Needs_tests:  1                              |   Needs_better_patch:  1         
     
---------------------------------------------+------------------------------
Changes (by Michael Axiak <[EMAIL PROTECTED]>):

 * cc: [EMAIL PROTECTED] (added)

Comment:

 With the latest patch, there's a new process for using this:
 
 1. '''Add the patch from #2070''' (e.g.
 {{{5113_file_upload_core_with_middleware_hooks.diff}}})
 
 {{{patch -p0 < 5113_file_upload_core_with_middleware_hooks.diff}}}
 
 2. Add this patch:
 
 {{{patch -p0 < 5116_new_admin_progress_bar.diff}}}
 
 3. Create the model:
 {{{
 #!python
 from django.db import models
 
 # Create your models here.
 class FileList(models.Model):
     name = models.CharField(maxlength=255)
     email = models.EmailField()
 
     class Admin:
         pass
 
 class AFile(models.Model):
     descr = models.CharField(maxlength=255,core=True)
     file = models.FileField(upload_to='files')
     inlist = models.ForeignKey(FileList,edit_inline=models.STACKED)
 }}}
 
 5. Set {{{FILE_UPLOAD_DIR}}} in your settings file to wherever you want to
 store temporary files.
 
 The changes between this one and the last version:
 
  * No !MiddleWare required. There's no reason to have middleware, the
 request has to deal with file uploads anyway, it should deal with it in a
 way that will allow views to use it. (If anyone has any differing
 opinions, let me know.)
 
  * No {{{js = ()}}} in the {{{class Admin}}} required. It's now an
 integral part of the oldforms Admin. What's next? newforms-admin.
 
  * The !JavaScript now deals with stopping and restarting uploads in a
 useful way.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4165#comment:7>
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