Waffle provides a simple API to check the state of flags, switches, and samples in views and templates, and even on the client in JavaScript.
Samples
Using Waffle in views