Show
Ignore:
Timestamp:
12/10/12 22:46:40 (7 years ago)
Author:
gpress
Message:

addresses ticket #1094, the android installer should now properly credit donations.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • seattle/trunk/seattlegeni/website/html/views.py

    r5978 r6045  
    901901  templatedict['username'] = username 
    902902  templatedict['validuser'] = validuser 
    903   templatedict['domain'] = "http://" + request.get_host() 
     903  templatedict['domain'] = "https://" + request.get_host() 
    904904  # I need to build a URL for android to download the installer from.   (The 
    905905  # same installer is downloaded from the Google Play store for all users.)  
     
    909909 
    910910  return direct_to_template(request, 'download/installers.html', templatedict) 
     911 
     912 
     913 
     914 
     915 
     916def build_android_installer(request, username): 
     917  """ 
     918  <Purpose> 
     919    Allows the user to download a Android distribution of Seattle that will 
     920    donate resources to user with 'username'. 
     921   
     922  <Arguments> 
     923    request: 
     924      Django HttpRequest object 
     925        
     926    username: 
     927      A string representing the GENI user to which the installer will donate 
     928      resources. 
     929   
     930  <Exceptions> 
     931    None 
     932   
     933  <Side Effects> 
     934    None 
     935   
     936  <Returns> 
     937    On failure, returns an HTTP response with a description of the error. On 
     938    success, redirects the user to download the installer. 
     939  """ 
     940   
     941  success, return_value = _build_installer(username, "android") 
     942   
     943  if not success: 
     944    error_response = return_value 
     945    return error_response 
     946   
     947  installer_url = return_value 
     948  return HttpResponseRedirect(installer_url) 
    911949 
    912950