python - How to prevent Django messages from leaking out to other modules? -


i using built-in django-messages framework of django version 1.10.

however, since messages stored in request, , therefore not "namespaced" different modules, concerned might lead potential circumstances messages created 1 module (e.g. messaging framework "your message has been sent") might bleed another.

is there way "namespace" these messages dont have unintended affect?

in addition, documentation says messages expire if iterated over, mean if forget iterate on them, have potential build on multiple requests?

you don't have iterate on messages expire them. django you.

when 1 request gets message it's iterated on next request, gets displayed if template allows , removed request data. means it's shown once , removed.

the way message email module displayed in account module redirect user account page directly after action adds message has been completed (after email has been sent, example). have complete control on views.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -