Hi Guys,
I am currently working with the web2py frame work and creating a similar website as to www.webjet.com.au (its just a uni project).
One of the function I need to write is the searchFlights function where I have created a custom HTML form which allows users to select dates, location etc etc.. The HTML is meant to send this information back to the function defined in the controller... where it then queries the database and returns the flight results...
The code for querying the database is:
I am currently getting an error when i try to search the flights... error is:
cannot concatenate 'str' and 'NoneType' objects
I am currently working with the web2py frame work and creating a similar website as to www.webjet.com.au (its just a uni project).
One of the function I need to write is the searchFlights function where I have created a custom HTML form which allows users to select dates, location etc etc.. The HTML is meant to send this information back to the function defined in the controller... where it then queries the database and returns the flight results...
The code for querying the database is:
def show(): receivedFlights = request.vars.DepartureLocation+','+request.vars.ArrivalLocation+','+request.vars.type+','+request.vars.DepartureDate+','+request.vars.ArrivalDate+','+request.vars.classType+','+request.vars.noOfAdults+','+request.vars.noOfChildren+','+request.vars.noOfInfants return dict(txt1=recievedflights, flights=db().select(db.Flight.request.DepartureLocation+','+request.vars.ArrivalLocation+','+request.vars.type+','+request.vars.DepartureDate+','+request.vars.ArrivalDate+','+request.vars.classType+','+request.vars.noOfAdults+','+request.vars.noOfChildren+','+request.vars.noOfInfants))
I am currently getting an error when i try to search the flights... error is:
cannot concatenate 'str' and 'NoneType' objects