Example #1
0
def index(variables={}, request={}):
    lines = r'''
               __.                                              
            .-".'                      .--.            _..._    
          .' .'                     .'    \       .-""  __ ""-. 
         /  /                     .'       : --..:__.-""  ""-. \
        :  :                     /         ;.d$$    sbp_.-""-:_:
        ;  :                    : ._       :P .-.   ,"TP        
        :   \                    \  T--...-; :d$b   :d$b        
         \   `.                   \  `..'    ;$ $   ;$ $        
          `.   "-.                 ).        :T$P   :T$P        
            \..---^..             /           `-'    `._`._     
           .'        "-.       .-"                     T$$$b    
          /             "-._.-"               ._        '^' ;   
         :                                    \.`.         /    
         ;                                -.   \`."-._.-'-'     
        :                                 .'\   \ \ \ \         
        ;  ;                             /:  \   \ \ . ;        
       :   :                            ,  ;  `.  `.;  :        
       ;    \        ;                     ;    "-._:  ;        
      :      `.      :                     :         \/         
      ;       /"-.    ;                    :                    
     :       /    "-. :                  : ;                    
     :     .'        T-;                 ; ;        
     ;    :          ; ;                /  :        
     ;    ;          : :              .'    ;       
    :    :            ;:         _..-"\     :       
    :     \           : ;       /      \     ;      
    ;    . '.         '-;      /        ;    :      
    ;  \  ; :           :     :         :    '-.      
    '.._L.:-'           :     ;    bug   ;    . `. 
                         ;    :          :  \  ; :  
                         :    '-..       '.._L.:-'  
                          ;     , `.                
                          :   \  ; :                
                          '..__L.:-'
    '''

    number = int(Cookie.get_cookie(request, 'doge', 0))
    Cookie.set_cookie(request, 'doge', str(number + 1), expires_after_days=60)

    pass_variables = {
        'info': lines,
        'number': number + 1,
        #list(map(lambda line: line.encode('utf8'), lines))
    }

    App.session.set('message', 'It is I, liteframework')
    return Controller.response_view('default.html', pass_variables)
Example #2
0
def edit_profile(variables={}, request={}):
    pass_variables = {'title': 'Edit profile'}
    return Controller.response_view('editprofile.html', pass_variables)
Example #3
0
def add_book(request={}, variables={}):
    pass_variables = {'title': 'Boox exchanges'}
    return Controller.response_view('exchange_notifications.html',
                                    pass_variables)
Example #4
0
def add_book(request={}, variables={}):
    pass_variables = {'title': 'Exchange a book'}
    return Controller.response_view('exchangebook.html', pass_variables)
Example #5
0
def add_book(request={}, variables={}):
    pass_variables = {'title': 'User profile'}
    return Controller.response_view('viewprofile.html', pass_variables)
Example #6
0
def add_book(request={}, variables={}):
    pass_variables = {'title': 'Search for a book'}
    return Controller.response_view('personalized_search.html', pass_variables)
Example #7
0
def add_book(request={}, variables={}):
    pass_variables = {'title': 'Add a book'}
    return Controller.response_view('addbook.html', pass_variables)
Example #8
0
def login(request={}, variables={}):
    pass_variables = {'title': 'Login'}
    return Controller.response_view('login.html', pass_variables)
Example #9
0
def register(request={}, variables={}):
    pass_variables = {'title': 'Register'}
    return Controller.response_view('register.html', pass_variables)
Example #10
0
def index(request={}, variables={}):
    pass_variables = {'title': 'BooX: the sharing platform'}
    return Controller.response_view('main.html', pass_variables)