generated from mwc/lab_server
	
		
			
				
	
	
		
			9 lines
		
	
	
		
			278 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			278 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from banjo.urls import route_get, route_post
 | 
						|
from banjo.http import BadRequest, NotFound
 | 
						|
from app.models import Line, Poem, Rhyme
 | 
						|
from random import choice, sample
 | 
						|
 | 
						|
@route_get('lines/random', args={})
 | 
						|
def get_random_line(params):
 | 
						|
    return {'line': Line.objects.random().text}
 |