Flash messages are used to notify the user that something has occurred. For example, a record has been created or they attempted to access something they were not authorized to do.
Questions tagged [flash-message]
408 questions
77
votes
8 answers
Multiple parameters in Flask approute
How to write the flask app.route if I have multiple parameters in the URL call?
Here is my URL I am calling from AJax:
http://0.0.0.0:8888/createcm?summary=VVV&change=Feauure
I was trying to write my flask app.route like…

user2058205
- 997
- 2
- 9
- 17
37
votes
1 answer
python flask display image on a html page
I am trying to pass a filename of an image and render it on a template,
Although I am passing the actual name through it does not display on the page
@app.route('/', methods=['GET','POST'])
@app.route('/start', methods=['GET','POST'])
def…

Darren rogers
- 627
- 2
- 8
- 17
30
votes
5 answers
How to set a flash message in Yii2?
i followed this Link. My code is as follows
in controller
public function actionFunction4()
{
$this->layout="sintel";
$model= new Customers();
\Yii::$app->getSession()->setFlash('success', 'successfully got on to the…

Bloodhound
- 2,906
- 11
- 37
- 71
24
votes
3 answers
In Rails, how to specify default flash messages in i18n locale file
I know there are some preset structures in i18n locale file so that Rails pulls values automatically. For example, if you want to set the default submit button text for new records:
# /config/locales/en.yml
en:
helpers:
submit:
create:…

robertwbradford
- 6,181
- 9
- 36
- 61
20
votes
4 answers
How to flashing a message with link using Flask flash?
I'm creating a web app using Flask to deal with GoogleOpenID, these codes are almost finished, except the flashing message contains a link:
@oid.after_login
def create_or_login(resp):
user =…

Kane Blueriver
- 4,170
- 4
- 29
- 48
15
votes
2 answers
How to set a Flash Message in Spring Boot with Thymeleaf
I am trying to implement Flash-Messages in my project built on Spring-Boot with Thymeleaf. But I found that it's not a built in feature so far. If this is the case, what are the options to show messages to the user after redirection.
I am trying to…

Yazid Erman
- 1,166
- 1
- 13
- 24
15
votes
4 answers
How to hide flash message after few seconds?
In my application user can post challenge for other user. So after successful posting a challenge I am displaying one flash message for the same. But now I want to hide this message after some few seconds. So I wrote following code : …

sweety
- 318
- 1
- 3
- 8
14
votes
1 answer
How to define Flash Notifications with Twitter Bootstrap Rails gem
I am trying to set flash notifications in the controller but it seems like I can only define :notice. When I try to define :errors or flash[:errors] I've gotten a bunch of errors. I currently have this working but all the messages are obviously a…

barnett
- 1,572
- 2
- 13
- 25
11
votes
7 answers
Yii2 - flash not visible after redirect
Flash messages seems to be broken in case of redirecting. I made simple test code:
public function actionTest($test = 0) {
if($test == 0) {
Yii::$app->getSession()->addFlash('success', 'Follow the white rabbit');
return…

Joe
- 2,551
- 6
- 38
- 60
11
votes
4 answers
How to set flash message in sonata admin Admin Controller
im looking for a way to set flash message in admin controller of sonata admin bundle, they allow to set flash messages in CRUDController as
$this->get('session')->setFlash('sonata_flash_error', 'flash_batch_merge_error');
but not in the Admin…

Lasith
- 565
- 1
- 6
- 17
10
votes
7 answers
Flash-Messages in Symfony2 doesn't seem to work in my twig-template
I want to add support for flash messages on our pages. I implemented
this by following the documentation found here.
I added the following snipplet to my base layout. (i also tried to add
it to a specific action template).
{% if…

stijink
- 227
- 1
- 2
- 11
10
votes
3 answers
link_to() in Rails flash
When a user fails login on my Rails app, I'd like to point them to a password reset page:
flash[:notice] = "Login failed. If you have forgotten your password, you can #{link_to('reset it', reset_path)}"
However, I can't use link_to in a…

Grandpa
- 3,053
- 1
- 25
- 35
9
votes
2 answers
how to clear existing flash messages in Flask
I have a warning flash message in Flask that that appears before the user tries to submit a form based on background information about the user. If the user goes ahead and submits the form the way they were warned not to, they are prevented and see…

Katie
- 808
- 1
- 11
- 28
9
votes
1 answer
Rails turbolinks 5 flash messages
I am trying to find a way to deal with rails (v4.1) flash messages when using turbolinks 5.
I tried adding data-temporary="true" to each flash message div and then something like:
$(document).on('turbolinks:before-cache', function () {
…

user1116573
- 2,817
- 4
- 17
- 27
9
votes
3 answers
Translate the Flash Message
I'm trying to translate the flash message I sent, if a form is succesful.
The normal request looks like this:
$request->getSession()->getFlashBag()->add(
'notice',
'Your E-Mail has been sent.'
);
So I tried to…

Moritz Traute
- 142
- 1
- 8