from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants, Group, Player from django.db import models import datetime debug = True def logger (dict): """ Description: This takes a dict of vallues and prints them to the console. Input: Dict - (Dict created in pages.py) Output: Log - (string to console) """ name = 'collateral_log.txt' file = open(name, 'a+') if debug == True: str_write = 'The value of#', dict['name'], ':', dict['var'], '#for the #group :',dict['group_id'], '#', 'Variable for the #var_id :', dict['role'], '# the date and time is #', datetime.datetime.now() file.write(str(str_write)) else: print('')