Ask Your Question
1

You cannot add messages without installing django.contrib.messages.middleware.MessageMiddleware

asked 2013-04-13 18:46:56 -0600

kris gravatar image

Everything installed and ran fine, but when I tried to edit something in the admin settings, I'd get this error:

You cannot add messages without installing django.contrib.messages.middleware.MessageMiddleware

I did a quick search and found that "django.contrib.messages" was in the INSTALLED_APPS, but "django.contrib.messages.middleware.MessageMiddleware" was missing from the MIDDLEWARE_CLASSES.

Is that a bug or did I configure something incorrectly somehow? Once I added "django.contrib.messages.middleware.MessageMiddleware" to the MIDDLEWARE_CLASSES I was able to save my settings.

edit retag flag offensive close merge delete

Comments

Yes, sorry, this was missing in the template, will add in a moment.

Evgeny gravatar imageEvgeny ( 2013-04-13 18:48:27 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-04-13 18:51:43 -0600

Evgeny gravatar image

Committed to the repository now. Just add "django.contrib.messages.middleware.MessageMiddleware", into the MIDDLEWARE_CLASSES just after the sessions middleware.

edit flag offensive delete link more

Comments

Thanks. If I find issues like this going forward, would you rather I post them here or submit them as pull requests on GitHub?

kris gravatar imagekris ( 2013-04-13 18:59:31 -0600 )edit

If you fix an issue, pull requests would be best. Thanks!

Evgeny gravatar imageEvgeny ( 2013-04-13 19:12:34 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-04-13 18:46:56 -0600

Seen: 1,771 times

Last updated: Apr 13 '13