Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I'd check out the browser's development tools and see what request is it performing. The only way I see where a view might be returning None would be if the request method of /result wasn't a GET.
-
@Ganofins Now, if your view only accepts GET requests, why checking for the request method inside of it? It should be GET or 405 Method Not Allowed all the time.
-
@Ganofins Removing the if would at least remove a branching path in your view that can result in it not returning anything. It's a start.
-
Ganofins7945y@ethernetzero actually before that I had both POST and GET in the methods argument, that's why it's there
-
hack64565y1. Remove request type checking. Thats pointless as @ethernetzero.
2. Does browser redirects you to /result?
3. Try returning just "hello". Does it simply prints? I don't know flask. Just want to check if returning a value works like you expected.
4. Try request.args.get("junk") -
Ganofins7945y
Related Rants
I feel stupid to ask this here
I am getting this error in flask
view didn't return a valid response error. The function either returned None or ended without a return statement.
question
simple form
flask
error