0

After an otree survey, I start with subprocess another django app, specially a django-oscar shop. It runs on another port. Now, I want to pass some data from the survey (first app, otree) to the shop (second app, django-oscar).

I tried this in app2/views.py:

from survey.models import Player

class CatalogueView(TemplateView):
    """
    Browse all products in the catalogue
    """
    model = Player
    context_object_name = "products"
    template_name = 'catalogue/browse.html'

But I just get this error:

ModuleNotFoundError: No module named 'otree'

I also tried to import otree.api and I put otree to installed_apps.

Any ideas, how to handle this?

alexrogo
  • 522
  • 3
  • 17

1 Answers1

0

Solved this a little differently. I have waived the sub processes and have created an API with django REST framework instead. Passing parameters back and forth were imho the best approach.

alexrogo
  • 522
  • 3
  • 17