
from turbogears import controllers, expose, flash

from mp3_player import widgets

import logging
log = logging.getLogger("mp3_player.controllers")

mp3_player = widgets.MP3Widget('MP3 Player Demo',
    dict(playlist='playlist.txt', width=225, height=75))


class Root(controllers.RootController):

    @expose(template="mp3_player.templates.demo")
    def index(self):
        log.debug("Happy TurboGears Controller Responding For Duty")
        flash("Your application is now running")
        return dict(mp3_player=mp3_player)
