cineclub-site/server/myapi/services/com_service.py

19 lines
376 B
Python
Raw Normal View History

2022-04-03 01:20:54 +02:00
from django.template.loader import render_to_string
from myapi.models import Film
prices = {
'one_cof': 4,
'one_exte': 5,
'card_cof': 30,
'card_exte': 35
}
def render_com(template_name, film: Film) -> str:
return render_to_string(template_name, {"film": film, "prices": prices})
def bocal(film: Film) -> str:
return render_com('bocal.tex', film)