def home(request, debug = ""): #Home page. if request.user.is_authenticated(): return loggedInHome(request) outSmiles = reactions.smiles(randomGenerator.randomStart()[0]) svg = serverRender.render(outSmiles) return render(request, 'index.html', {'molecule': svg, 'signUpForm': models.mySignUpForm, 'logInForm': models.myAuthenticationForm(), 'debug':debug , 'resetPWForm': models.myPasswordResetForm()})
def homeMoleculeChanger(request): #Returns new molecules for the AJAX tester (home molecule changer) outSmiles = reactions.smiles(randomGenerator.randomStart()[0]) svg = serverRender.render(outSmiles) return HttpResponse(svg)