First time here? Check out the FAQ!
0

Where to place 'askbot.middleware.csrf.CsrfViewMiddleware' ?

When running 'python mange.py syncdb', the django self-check tells me the following:

 The order the middleware records is important, please take a look at the example in
 [I cannot post links]github.com/ASKBOT/askbot-devel/blob/master/askbot/setup_templates/settings.py:

'askbot.middleware.csrf.CsrfViewMiddleware',

The linked example does not contain 'askbot.middleware.csrf.CsrfViewMiddleware'. I tried to place it at the beginning or at the end of the middlware records, but the self-check kept telling me that the position is wrong

schubert.konstantin's avatar
1
schubert.konstantin
asked 2015-06-21 07:28:22 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

Hi,

You need to put this entry into the MIDDLEWARE classes section of settings.py.

MIDDLEWARE_CLASSES = (
    #'django.middleware.gzip.GZipMiddleware',
   ...
    'askbot.middleware.spaceless.SpacelessMiddleware',
    'askbot.middleware.csrf.CsrfViewMiddleware',
)
mrmartin's avatar
1
mrmartin
answered 2015-07-16 04:33:59 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments