~davewalker/awstrial/natty.dev

« back to all changes in this revision

Viewing changes to awstrial/trial/views.py

  • Committer: Dave Walker (Daviey)
  • Date: 2011-03-17 20:02:41 UTC
  • Revision ID: davewalker@ubuntu.com-20110317200241-obyeyf2w62h02bt4
Removed some debugging mail code, and made campaign optional in runnit - might not be ideal

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
                        password=util.rand_user_password()
95
95
 
96
96
                    ec2_helper.runit(campaign,lpid=request.user, regions=regions, config=config, byobu=byobu, password=password)
97
 
                    #send_mail(subject, message, from_email, ['davewalker@ubuntu.com'])
98
 
                    #except BadHeaderError:   #Example of basic error handling
99
 
                    #   return HttpResponse('Invalid header found.')
 
97
 
100
98
                    return HttpResponseRedirect("/%s/instance_info/" % campaign)
101
99
 
102
100
            # if the user did not have ssh keys, then the contacts.html
104
102
            set_password = False
105
103
            if not request.user.profile.has_ssh:
106
104
                set_password = True
107
 
 
108
105
            return render_to_response('contacts.html',
109
106
                { 'form': Instances(), 'settings': settings,
110
107
                  'set_password': set_password },