I have an oTree survey and I am working on an oscar shop. Now I want to combine them.
I first start the otree project (locally, otree devserver on port 8000). After the questions, I start a subprocess to call another server (py manage.py runserver, port 8080) and open another browser tab.
Based on the answers, I would like to assign the player budget in the shop. How can I pass data through the projects?
from survey.models import Player # otree models
class CatalogueView(TemplateView):
"""
Browse all products in the catalogue
"""
model = Player
context_object_name = "products"
But I just get this error:
ModuleNotFoundError: No module named 'otree'
I also put otree to INSTALLED_APPS and I tried to import otree.api.