Combine an otree django project with oscar django project and pass data around?

4 views
Skip to first unread message

Alexander Rogowski

unread,
Jan 5, 2019, 8:18:01 AM1/5/19
to Django users
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.

Any ideas, how to handle this?
Reply all
Reply to author
Forward
0 new messages