app/soc/views/models/program.py
changeset 2879 cb0f9b4646aa
parent 2871 e440e94a874b
equal deleted inserted replaced
2878:cf4b80992451 2879:cb0f9b4646aa
    23     '"Sverre Rabbelier" <sverre@rabbelier.nl>',
    23     '"Sverre Rabbelier" <sverre@rabbelier.nl>',
    24     '"Lennard de Rijk" <ljvderijk@gmail.com>',
    24     '"Lennard de Rijk" <ljvderijk@gmail.com>',
    25   ]
    25   ]
    26 
    26 
    27 
    27 
    28 import os
       
    29 
       
    30 from django import forms
    28 from django import forms
    31 from django import http
    29 from django import http
    32 from django.utils.translation import ugettext
    30 from django.utils.translation import ugettext
    33 
    31 
    34 from soc.logic import allocations
    32 from soc.logic import allocations
    35 from soc.logic import cleaning
    33 from soc.logic import cleaning
    36 from soc.logic import dicts
    34 from soc.logic import dicts
       
    35 from soc.logic import system
    37 from soc.logic.helper import timeline as timeline_helper
    36 from soc.logic.helper import timeline as timeline_helper
    38 from soc.logic.models import host as host_logic
    37 from soc.logic.models import host as host_logic
    39 from soc.logic.models import mentor as mentor_logic
    38 from soc.logic.models import mentor as mentor_logic
    40 from soc.logic.models import organization as org_logic
    39 from soc.logic.models import organization as org_logic
    41 from soc.logic.models import org_admin as org_admin_logic
    40 from soc.logic.models import org_admin as org_admin_logic
   414     content = self._getAcceptedOrgsList(description, org_params, filter, False)
   413     content = self._getAcceptedOrgsList(description, org_params, filter, False)
   415 
   414 
   416     contents = [content]
   415     contents = [content]
   417 
   416 
   418     return_url =  "http://%(host)s%(index)s" % {
   417     return_url =  "http://%(host)s%(index)s" % {
   419       'host' : os.environ['HTTP_HOST'],
   418       'host' : system.getHostname(),
   420       'index': redirects.getSlotsRedirect(program, params)
   419       'index': redirects.getSlotsRedirect(program, params)
   421       }
   420       }
   422 
   421 
   423     context = {
   422     context = {
   424         'total_slots': program.slots,
   423         'total_slots': program.slots,