returnrender_template('home.html',short_url=request.form.get('domain')+"/"+request.form.get('short'),builddate=builddate,domain=domain_prepared)#return the shorten link to the user
returnrender_template('home.html',short_url=shorturl,builddate=builddate,domain=domain_prepared,qrcode=makeQR("http://"+shorturl))#return the shorten link to the user
else:
returnrender_template('home.html',builddate=builddate,domain=domain_prepared,alreadychoosen=True,long_url_prefilled=request.form.get('url'),short_url_prefilled=request.form.get('short'),domain_prefilled=domain_to_index[request.form.get('domain')])#return the user the prefilled form with an error message, because the url was already used
returnrender_template('home.html',builddate=builddate,domain=domain_prepared)#If request method is get, return the default site to create a new shorten link