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

  • SEARCH
  • Home
  • 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 8929099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:35:57+00:00 2026-06-15T08:35:57+00:00

I am making the view to list the data in my view like this

  • 0

I am making the view to list the data in my view like this

class DownloadView(ListView):
    template_name = 'mytemplate.html'

Now in my that view , i want that when the page loads then i generate a pdf file in that view (which i can do) and then it should prompt the user with save file option. how can i do that

  • 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-06-15T08:35:58+00:00Added an answer on June 15, 2026 at 8:35 am

    Check out the django docs, it shows populating the response['Content-Disposition'] with 'attachment; filename="somefilename.pdf"', but I think the following may work, if you’ve read the pdf file data into pdf_data.

    from django.http import HttpResponse
    
    def serve_pdf_view(request):
        pdf_data = magically_create_pdf()
        return HttpResponse(pdf_data, content_type='application/pdf')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically I'm making a list view that you can add things to the top
I am making a view just like the iPhone Calendar ListView. I am using
I am making a post via Jquery ajax that looks like this: $.ajax({ type:
I am displaying many rows of data in a list view that is bound
I am making a custom listview, in that data is dynamically changing after sometime.
I am making a View that has a DropDown. The view is supplied with
So i'm making a custom View that displays some graphs (plots), and in some
I am making an app in which on one of the view I want
Making a form that will accept a bunch of textual data and an image
I run through this Making a Cookbook tutorial (http://javascriptmvc.com/docs.html#&who=getstarted) Since I work with rails

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.