0

Good day expert, am trying to direct user to a web page if login is okay in python but does not work

if username==okay and password == okay:
# direct to success_page.py
print "Location: success_page.py\r\n";

else:
direct to errorpage.py

the code does not work as the web page is not word message and cannot be printed. any help
thanks

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by inuasha
0

the code does not work as the web page is not word message and cannot be printed. any help
thanks

I'm sorry, I do not understand this. Do you need to create a web page using Python? There are many options to do that. I use Django for large projects with simple database needs; you may also like to look at Web2Py or an overview: http://wiki.python.org/moin/WebFrameworks

Edited by griswolf: n/a

0

you need the code to print out the html not just the words so instead of print"location blah blah" you need to do print"<html><head><title></title></head><body><p>Location blah blah</p></body</html>"

Edited by Narue: Snipped advertisement/self-promotion

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.