default-hour #14
					 1 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -15,11 +15,12 @@ app.url_map.strict_slashes = False
 | 
			
		|||
@app.route('/<int(min=0, max=23):hours>/<int(min=0, max=59):minutes>')
 | 
			
		||||
def index(hours=None, minutes=None):
 | 
			
		||||
    """ main and only app """
 | 
			
		||||
    if not hours:
 | 
			
		||||
        hours = 17
 | 
			
		||||
    if hours and not minutes:
 | 
			
		||||
 | 
			
		||||
    if hours:
 | 
			
		||||
        if not minutes:
 | 
			
		||||
            minutes = 0
 | 
			
		||||
    else:
 | 
			
		||||
        hours = 17
 | 
			
		||||
        minutes = 30
 | 
			
		||||
 | 
			
		||||
    data = render_template('beer.html', hours=hours, minutes=minutes)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue