app/soc/tasks/surveys.py
changeset 2867 e8d86272e6ea
parent 2615 08788ae10436
child 2871 e440e94a874b
equal deleted inserted replaced
2865:fee8732830f7 2867:e8d86272e6ea
    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
       
    27 
    26 
    28 from google.appengine.api.labs import taskqueue
    27 from google.appengine.api.labs import taskqueue
    29 
    28 
    30 from django import http
    29 from django import http
    31 
    30 
    32 from soc.tasks.helper import error_handler
    31 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': os.environ['HTTP_HOST'],
   225       'host': system.getHostname(),
   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(),