def index(): cmd = facade.list_courses_cmd() courses = cmd() public_form = facade.course_public_form() course_public_dcts = [public_form.fill_with_model(course) for course in courses] context = {"courses": course_public_dcts, "admin_path": router.to_path(admin)} return TemplateResponse(context)
def index(): cmd = facade.list_courses_cmd() courses = cmd() public_form = facade.course_public_form() course_public_dcts = [public_form.fill_with_model(course) for course in courses] context = {'trailers': course_public_dcts,'admin_path':router.to_path(admin)} return TemplateResponse(context)
def index(): form=FormGenerico() error=form.validate() logging.error(error) cmd = facade.list_courses_cmd() courses = cmd() public_form = facade.course_public_form() course_public_dcts = [public_form.fill_with_model(course) for course in courses] context = {'courses': course_public_dcts,'admin_path':router.to_path(admin)} return TemplateResponse(context)