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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:16:18+00:00 2026-05-29T19:16:18+00:00

Can anyone clarify how to order below middleware classes? ‘mediagenerator.middleware.MediaMiddleware’, ‘autoload.middleware.AutoloadMiddleware’, ‘django.middleware.cache.UpdateCacheMiddleware’, . .

  • 0

Can anyone clarify how to order below middleware classes?

'mediagenerator.middleware.MediaMiddleware', 
'autoload.middleware.AutoloadMiddleware', 
'django.middleware.cache.UpdateCacheMiddleware', 
    . 
    . 
    . 
'django.middleware.cache.FetchFromCacheMiddleware',
'google.appengine.ext.appstats.recording.AppStatsDjangoMiddleware', 

In documents, every middleware in the top group is told to come first,
and both middleware in the bottom group is told to come last.
This is confusing.
Below is the whole list of middleware that I’m using:

'mediagenerator.middleware.MediaMiddleware', 
'autoload.middleware.AutoloadMiddleware', 
'django.middleware.cache.UpdateCacheMiddleware', 
'django.middleware.common.CommonMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware', 
'django.contrib.csrf.middleware.CsrfViewMiddleware', 
'django.middleware.csrf.CsrfResponseMiddleware', 
'django.middleware.cache.FetchFromCacheMiddleware', 
'google.appengine.ext.appstats.recording.AppStatsDjangoMiddleware',

Any help and explanation will be appreciated.

  • 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-29T19:16:19+00:00Added an answer on May 29, 2026 at 7:16 pm

    Please check if everything is working:

    'autoload.middleware.AutoloadMiddleware',   # This is loading other modules, so it goes first because we want everything set before processing.
    'mediagenerator.middleware.MediaMiddleware',   # Serves/caches static files with urls starting with DEV_MEDIA_URL 
    'django.middleware.cache.UpdateCacheMiddleware',   # Must be before other middleware that changes the header, so it seems that the right place for this is here
    'google.appengine.ext.appstats.recording.AppStatsDjangoMiddleware', # Must be 'first' too. It collects stats of all middlewares below this. If you want stats from the middlewares above move it to the top
    
    'django.middleware.common.CommonMiddleware', 
    'django.contrib.sessions.middleware.SessionMiddleware', 
    'django.contrib.auth.middleware.AuthenticationMiddleware', 
    'django.contrib.csrf.middleware.CsrfViewMiddleware', 
    'django.middleware.csrf.CsrfResponseMiddleware', 
    'django.middleware.cache.FetchFromCacheMiddleware', 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone clarify/elucidate the situation with respect to -[NSNotificationCenter addObserver:selector:name:object:] ? What types of
Can anyone clarify how we can use in general, or a in real world
Can anyone clarify if the GDI StretchBlt function for the workstation Win32 API performs
Can anyone clarify to me the difference between the following: 1. { // ...
Can anyone clarify if Enterprise Library's Database object can be made static without any
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
Can anyone tell me how I can display a status message like 12 seconds
Can anyone recommend a good library for generating an audio file, such as mp3,
Can anyone recommend some good resources that highlight the differences between Oracle and the
Can anyone point me to a good resource (or throw me a clue) to

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.