First time here? Check out the FAQ!
0

How come this is a hack?
 

Hi

In anon_user.py, there's a comment in process_request() that says

#todo: a hack, for real we need to remove this middleware

How is that middleware a hack?

Thanks in advance

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
kate_r's avatar
107
kate_r
asked 11 years ago

Comments

see more comments

1 Answer

0

I think it's because we want to run this middleware only for askbot app, and not any other apps that may be deployed on the site.

Now I don't remember why I've added that specific comment.

Django has a doc page explaining how middleware runs.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 11 years ago
link

Comments

see more comments