Initial commit

This commit is contained in:
2025-09-29 16:21:01 +00:00
commit c6b9e7cf27
9 changed files with 984 additions and 0 deletions

8
poem_server/app/views.py Normal file
View File

@@ -0,0 +1,8 @@
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}