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 7932539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:03:11+00:00 2026-06-03T21:03:11+00:00

I am not new to Django (1y work experience) but I have got a

  • 0

I am not new to Django (1y work experience) but I have got a strange task that I cannot deal with.
So I have to write to write Middleware that will be counting requests, but only those that were not aborted by client (the ones that got fully rendered in browser).

I found out that when client aborts connection, server (Python) throws errno 32 Broken Pipe as it comes from unsuccessful write to socket [I think that connection server-client is TCP there so it is nothing strange].

But the problem is that I cannot find a way to check if browser fully rendered page or to check if that error occurred (of course that error can have another origin but it would be a good start).

Ohhh and I don’t want to use JS (with JS it is a piece of cake) but I can use HTML5 (if it can help…)

  • 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-03T21:03:12+00:00Added an answer on June 3, 2026 at 9:03 pm

    I may have found the answer to your question, that is execute some code when the HTTPResponse has been sent. You can then increment what you want after the page has been fully sent to the client.

    The example subclasses HttpResponse and returns an instance of the derived class explicitly in a view. If you have many views you don’t want to override, maybe you could try this piece of code under your subclass definition

    HttpResponse.__bases__ += (FullLoggingHttpResponse,)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Django and Web programming in general. Have googled but could not
I am pretty new to django, but have many years experience coding in the
I am not new to Wordpress, but new to PHP. I have managed to
I'm not exactly new to PHP but I haven't used MySQL that much, so
I'm new to Django... I need to start a project that will have subdomains,
I'm new to Django (and Python) and I have been trying to work out
I have a web report that uses a Django form (new forms) for fields
I create a new Django app (not project) called Bussinesses, then add following class
I'm new to Django, and I'm not sure what I want is possible: I
I'm not new to version control, but am new to version control through the

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.