예제 #1
0
def my_form_post(names=None,index=None,title=None,ing=None,soda1=None, soda2=None,soda3=None,qa=None,startTime=None,timeA=None,gender=None,length=None,message=None,links=[],parts=[],Creators=[],caLinks=[]):
	links=[]
	parts=[]
	Creators=[]
	caLinks=[]
	startTime=time.time()
	soda1 = request.form['soda1']
	soda2 = request.form['soda2']
	soda3 = request.form['soda3']
	names=den.getPops()
	index=randint(0,len(names)-1)
	title=names[index][0]
	ing=den.getIng(title)
	if soda1!="No Other Soda" and soda2!="No Other Soda" and soda3!="No Other Soda":
		if soda1==soda2 or soda1==soda3 or soda3==soda2:
			message="Please Select Different Drinks"
			return render_template("index.html",message=message,title=title,ing=ing)
	qa=request.form['qa']
	links.append(soda1)
	links.append(soda2)
	links.append(soda3)
	links=den.findDen(links,qa)
	links=den.deleteDuplicates(links)
	for item in links:
		parts.append(den.getIng(item))
		Creators.append(den.getCreator(item))
		caLinks.append(den.getCrLinks(item))
	length=len(links)
	timeA = time.time() - startTime
	return render_template('link.html',links=links,soda3=soda3,soda2=soda2,soda1=soda1,length=length,timeA=timeA,parts=parts,caLinks=caLinks,Creators=Creators)
예제 #2
0
def my_form_post(names=None,
                 index=None,
                 title=None,
                 ing=None,
                 soda1=None,
                 soda2=None,
                 soda3=None,
                 qa=None,
                 startTime=None,
                 timeA=None,
                 gender=None,
                 length=None,
                 message=None,
                 links=[],
                 parts=[],
                 Creators=[],
                 caLinks=[]):
    links = []
    parts = []
    Creators = []
    caLinks = []
    startTime = time.time()
    soda1 = request.form['soda1']
    soda2 = request.form['soda2']
    soda3 = request.form['soda3']
    names = den.getPops()
    index = randint(0, len(names) - 1)
    title = names[index][0]
    ing = den.getIng(title)
    if soda1 != "No Other Soda" and soda2 != "No Other Soda" and soda3 != "No Other Soda":
        if soda1 == soda2 or soda1 == soda3 or soda3 == soda2:
            message = "Please Select Different Drinks"
            return render_template("index.html",
                                   message=message,
                                   title=title,
                                   ing=ing)
    qa = request.form['qa']
    links.append(soda1)
    links.append(soda2)
    links.append(soda3)
    links = den.findDen(links, qa)
    links = den.deleteDuplicates(links)
    for item in links:
        parts.append(den.getIng(item))
        Creators.append(den.getCreator(item))
        caLinks.append(den.getCrLinks(item))
    length = len(links)
    timeA = time.time() - startTime
    return render_template('link.html',
                           links=links,
                           soda3=soda3,
                           soda2=soda2,
                           soda1=soda1,
                           length=length,
                           timeA=timeA,
                           parts=parts,
                           caLinks=caLinks,
                           Creators=Creators)
예제 #3
0
def denDataPop(nameA=None,passA=None,message=None,names=[],dens=[],length=None):
	nameA = request.form['nameA']
	passA = request.form['passA']
	dens=[]
	names=[]
	if nameA=="*****@*****.**" and passA=="abir1":
		dens=den.getPops()
		for item in dens:
			names.append(item[0])
		length=len(names)
		return render_template("names.html",names=names,length=length)
	else:
		message="Wrong Password"
		return render_template("login.html",message=message)
예제 #4
0
def denDataPop(nameA=None,
               passA=None,
               message=None,
               names=[],
               dens=[],
               length=None):
    nameA = request.form['nameA']
    passA = request.form['passA']
    dens = []
    names = []
    if nameA == "*****@*****.**" and passA == "abir1":
        dens = den.getPops()
        for item in dens:
            names.append(item[0])
        length = len(names)
        return render_template("names.html", names=names, length=length)
    else:
        message = "Wrong Password"
        return render_template("login.html", message=message)
예제 #5
0
def my_form():
    names = den.getPops()
    index = randint(0, len(names) - 1)
    title = names[index][0]
    ing = den.getIng(title)
    return render_template("index.html", title=title, ing=ing)
예제 #6
0
def my_form():
	names=den.getPops()
	index=randint(0,len(names)-1)
	title=names[index][0]
	ing=den.getIng(title)
	return render_template("index.html",title=title,ing=ing)