djc / askama

Type-safe, compiled Jinja-like templates for Rust
Apache License 2.0
3.47k stars 219 forks source link

How could i get session flash message in a view after redirect #914

Closed HosMercury closed 11 months ago

HosMercury commented 11 months ago

Askama is impressive

thanx for doing that great template engine ...

when getting a view after redirect

how could I globally get the session data ( to use as a flash message )

should be added in the base.html to check if there is a flash_message then show it/them otherwise nothing

djc commented 11 months ago

This doesn't really seem to have any bearing on Askama specifically. You should figure out the right way to get the data into the Askama context type, then Askama can take care of rendering it for you.

HosMercury commented 11 months ago

I still think we have to have locals