Ejemplo n.º 1
0
    def get(self):
#        ua = self.request.headers['User-Agent']
#        if 'MSIE' in ua:
#            self.redirect('http://chrome.google.com/')
        
        welcome = Welcome.all().get()

        self.response.out.write(welcome.text)
Ejemplo n.º 2
0
    def get(self):
        welcome = Welcome.all()
        welcome = welcome.get()
        if not welcome:
            welcome = Welcome()
        
        loginurl = users.create_login_url('/verifylogin?gate=hastymoney')
        playurl = '/hastymoney'

        newsoftinvestments = self.getnewsoftinvestments()
        
        newsolidinvestments = self.getnewsolidinvestments()
        
        biggestinvestors = self.getbiggestinvestors()
        
        mostpopularinvestments = self.getmostpopularinvestments()
        
        richest = self.getrichest()
        
        poorest = self.getpoorest()
        
        raffle = self.getraffle()
        lastwinner = self.getlastwinner(raffle)
        
        headermessage = '''
        <p><strong>Hasty Money: the FUN investment game</strong> where you become a billionaire tycoon or go broke. You can invest in whoever or whatever you want, 
        buy and sell stuffs for profit, run a Ponzi scheme, take your chances with the raffle, or just
        sit around and bum money from your friends. Your financial empire begins the moment you click that big green play botton above.</p>
        <p><div class="note">
        Please note: Hasty Money is currently in limited beta, meaning there are only so many players allowed in, 
        and some aspects of the game may change.
        </div>
        </p>
        '''

        template_values = {
            'loginurl': loginurl,
            'playurl': playurl,
            'newsoftinvestments': newsoftinvestments,
            'newsolidinvestments': newsolidinvestments,
            'biggestinvestors': biggestinvestors,
            'mostpopularinvestments': mostpopularinvestments,
            'richest': richest,
            'poorest': poorest,
            'raffle': raffle,
            'lastwinner': lastwinner,
            'headermessage': headermessage,
            }

        path = os.path.join(os.path.dirname(__file__), 'welcome.html')
        welcome.text = template.render(path, template_values)
        welcome.put()
        self.response.out.write('done')