title: Dynamic Buttons/Images with Django and Mongodb
body: <p>I have a MQTT Client that logs messages to mongodb. I would like to use Django to dynamically create a webpage with a image or button on it depending on the last insert to the database. For example there will either be a 0 or 1 if the latest insert was a 0 display a green power button if it was 1 display a red power button. Also on the pressing of that button it performs a command and inserts the opposite value in the database. Is this possible and if so how?</p>