Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 242051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:48:18+00:00 2026-05-11T20:48:18+00:00

In a django application I am working on, I have just added the ability

  • 0

In a django application I am working on, I have just added the ability to archive a number of files (starting 50mb in total) to a zip file. Currently, i am doing it something like this:

get files to zip
zip all files
send HTML response

Obviously, this causes a big wait on line two where the files are being compressed. What can i do to make this processes a whole lot better for the user? Although having a progress bar would be the best, even if it just returned a static page saying ‘please wait’ or whatever.

Any thoughts and ideas would be loved.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:48:18+00:00Added an answer on May 11, 2026 at 8:48 pm

    You should keep in mind showing the progress bar may not be a good idea, since you can get timeouts or get your server suffer from submitting lot of simultaneous requests.

    Put the zipping task in the queue and have it callback to notify the user somehow – by e-mail for instance – that the process has finished.

    Take a look at django-lineup

    Your code will look pretty much like:

    from lineup import registry
    from lineup import _debug
    
    def create_archive(queue_id, queue):
        queue.set_param("zip_link", _create_archive(resource = queue.context_object, user = queue.user))
        return queue
    
    
    def create_archive_callback(queue_id, queue):
        _send_email_notification(subject = queue.get_param("zip_link"), user = queue.user)
        return queue
    
    registry.register_job('create_archive', create_archive, callback = create_archive_callback)
    

    In your views, create queued tasks by:

        from lineup.factory import JobFactory
        j = JobFactory()
        j.create_job(self, 'create_archive', request.user, your_resource_object_containing_files_to_zip, { 'extra_param': 'value' })
    

    Then run your queue processor (probably inside of a screen session):

    ./manage.py run_queue
    

    Oh, and on the subject you might be also interested in estimating zip file creation time. I got pretty slick answers there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a blog application in Django. Naturally, I have models set up
I've just started building a prototype application in Django. I started out by working
I'm working on my first Django application. In short, what it needs to do
I am working on an django application that will return what historically was a
I am working on a web application using Python (Django) and would like to
When starting a django application using python manage.py shell , I get an InteractiveConsole
I have set up a Django application that uses images. I think I have
I am working on integration of django application with facebook and i did almost
I am currently working on a Django/Pinax application (I'm sure my question is not
In my django application I am using a template to construct email body, one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.