MIDDLEWARE_CLASSES order

I noticed that the order recommended by askbot for MIDDLEWARE_CLASSES has:

'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',

whereas django documentation and default settings has:

 'django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',

If i change the order to match what Django recommends it takes the site down ... the ordering of middle ware always confuses me a bit, but I am wondering why the difference and if it has any side effects for other functioning?

esse's avatar
23
esse
asked 2012-11-21 00:17:14 -0500
edit flag offensive 0 remove flag close merge delete

Comments

I have been reading the Django documentation lately and I notice that sometimes they have the SessionsMiddleware before CommonMiddleware, despite their documentation that I linked to. Still not 100% sure about it all.

esse's avatar esse (2012-11-22 22:51:40 -0500) edit
add a comment see more comments