Python Forum
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Back end issues
#1
Im doing a front and back end project which will be run on apache 2.4.7
So far however, my backend, when requested by the front end, returns an error. Pls send help.

FRONT END:
<!DOCTYPE html>
<html>
 <head>
   <title>SAT College Board 2010 School Level Results</title>
 </head>
 
 <body>
SAT SCHOOL LEVEL RESULTS !!! <br>
   <form action = "Backend.py">
What is the name of the school whose results you wish to view?
     <input type = "text" name = "school"> <br>
What is the District Number?
     <input type = "number" name = "dn"> <br>        
     <input type = "submit" name = "doThis" value = "Submit Form">
   </form>
 </body>
</html>

BACK END:
#! /usr/bin/python

print 'content-type: text/html \n'

import cgitb
cgitb.enable()

import cgi
fs = cgi.FieldStorage()
import csv

DB =open('SAT_School_Participation_and_Performance__2012-2013.csv', 'rb')
readerObject = csv.reader( DB)
for record in readerObject:
   account = line.split(",")
   if record.append(account[0]) = data["school"].value
return record
   if record.append(account[1]) = fs["dn"].value
       return record
DB.close()
Reply


Messages In This Thread
Back end issues - by brianmluo - Jun-11-2017, 03:05 AM
RE: Back end issues - by ichabod801 - Jun-11-2017, 06:39 AM
RE: Back end issues - by snippsat - Jun-12-2017, 08:25 PM
RE: Back end issues - by nilamo - Aug-08-2017, 07:05 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020