from django.http import HttpResponseRedirect from otree.api import Currency as c, currency_range from . import models from ._builtin import Page, WaitPage from .models import Constants from otreeutils.pages import ExtendedPage import logging logger = logging.getLogger(__name__) class ThankYou_simple(Page): custom_name_in_url = 'ty' timeout_seconds = 300 def vars_for_template(self): self.participant.vars['payment_completing_experiment'] = Constants.payment_completing_experiment self.participant.vars['payoff_of_study'] = self.participant.vars['payment_completing_experiment'] def post(self): return HttpResponseRedirect('https://app.prolific.co/submissions/complete?cc=5BAF989B') # redirecting implies importing a method at the beginning of pages.py: # from django.http import HttpResponseRedirect # GO TO PROLIFIC PAGE - NEW STUDY - SECTION: # "To prove that participants have completed your study, we require that you redirect them to the following special URL on our site:" # COPY & PASTE LINK ABOVE # When you first install oTree, The entire admin interface is accessible without a password. # However, when you are ready to deploy to your audience, you should password protect the admin. # f you are launching an experiment and want visitors to only be able to play your app # if you provided them with a start link, set the environment variable OTREE_AUTH_LEVEL to STUDY. # https://otree.readthedocs.io/en/latest/admin.html?fbclid=IwAR3wbtO7pdJq7K2CNeV_LDrZjOcgK4tcVj30R9v8x5LwkeGldH2r8FqGznI#participant-labels page_sequence = [ ThankYou_simple ]