예제 #1
0
    def main_page(self, environ, start_response):
        try:
            meeplib.get_curr_user()
        except NameError:
            meeplib.delete_curr_user()
        headers = [('Content-type', 'text/html')]
        
        start_response("200 OK", headers)
        username = meeplib.get_curr_user()

        return [render_page('index.html', username=username)]
예제 #2
0
    def main_page(self, environ, start_response):
        try:
            meeplib.get_curr_user()
        except NameError:
            meeplib.delete_curr_user()
        headers = [('Content-type', 'text/html')]

        start_response("200 OK", headers)
        username = meeplib.get_curr_user()

        return [render_page('index.html', username=username)]
예제 #3
0
    def home_page(self, environ, start_response):
        try:
            meeplib.get_curr_user()
        except NameError:
            meeplib.delete_curr_user()
        headers = [('Content-type', 'text/html')]
        
        start_response("200 OK", headers)
        username = meeplib.get_curr_user()

        return ["""%s logged in!<p><a href='/m/add_message'>Add a Message</a><p><a href='/create_user'>Create a User</a><p><a href='/logout'>Log out</a><p><a href='/m/list'>Show All Messages</a>""" % (username,)]
예제 #4
0
    def home_page(self, environ, start_response):
        try:
            meeplib.get_curr_user()
        except NameError:
            meeplib.delete_curr_user()
        headers = [('Content-type', 'text/html')]

        start_response("200 OK", headers)
        username = meeplib.get_curr_user()

        return [
            """%s logged in!<p><a href='/m/add_message'>Add a Message</a><p><a href='/create_user'>Create a User</a><p><a href='/logout'>Log out</a><p><a href='/m/list'>Show All Messages</a>"""
            % (username, )
        ]