app/soc/tasks/surveys.py
changeset 2871 e440e94a874b
parent 2867 e8d86272e6ea
child 2879 cb0f9b4646aa
equal deleted inserted replaced
2869:1ac6a1e1e429 2871:e440e94a874b
    21   '"Lennard de Rijk" <ljvderijk@gmail.com>',
    21   '"Lennard de Rijk" <ljvderijk@gmail.com>',
    22   ]
    22   ]
    23 
    23 
    24 
    24 
    25 import logging
    25 import logging
       
    26 import os
    26 
    27 
    27 from google.appengine.api.labs import taskqueue
    28 from google.appengine.api.labs import taskqueue
    28 
    29 
    29 from django import http
    30 from django import http
    30 
    31 
    31 from soc.tasks.helper import error_handler
    32 from soc.tasks.helper import error_handler
    32 from soc.logic import system
       
    33 
    33 
    34 
    34 
    35 def getDjangoURLPatterns():
    35 def getDjangoURLPatterns():
    36   """Returns the URL patterns for the tasks in this module.
    36   """Returns the URL patterns for the tasks in this module.
    37   """
    37   """
   220       to_role = student_project.mentor
   220       to_role = student_project.mentor
   221       mail_template = 'soc/grading_project_survey/mail/reminder_gsoc.html'
   221       mail_template = 'soc/grading_project_survey/mail/reminder_gsoc.html'
   222 
   222 
   223     survey_url = "http://%(host)s%(redirect)s" % {
   223     survey_url = "http://%(host)s%(redirect)s" % {
   224       'redirect': survey_redirect,
   224       'redirect': survey_redirect,
   225       'host': system.getHostname(),
   225       'host': os.environ['HTTP_HOST'],
   226       }
   226       }
   227 
   227 
   228     # set the context for the mail template
   228     # set the context for the mail template
   229     mail_context = {
   229     mail_context = {
   230         'student_name': student_entity.name(),
   230         'student_name': student_entity.name(),