[wsgi] [minor] fixed request host name

This commit is contained in:
Rushabh Mehta 2013-09-17 22:13:29 +05:30
parent d05a39caa2
commit 93ff8bf7f8
3 changed files with 3 additions and 2 deletions

View file

@ -214,7 +214,7 @@ Thank you,<br>
# disable the user and log him/her out
self.doc.enabled = 0
if getattr(webnotes, "login_manager", None):
if webnotes.local.login_manager:
webnotes.local.login_manager.logout(user=self.doc.name)
# delete their password

View file

@ -26,7 +26,7 @@ class HTTPRequest:
# override request method. All request to be of type POST, but if _type == "POST" then commit
if webnotes.form_dict.get("_type"):
webnotes.request_method = webnotes.form_dict.get("_type")
webnotes.local.request_method = webnotes.form_dict.get("_type")
del webnotes.form_dict["_type"]
# set db

View file

@ -30,6 +30,7 @@ def web_logout():
webnotes.repsond_as_web_page("Logged Out", """<p>You have been logged out.</p>
<p><a href='index'>Back to Home</a></p>""")
webnotes.local.login_manager.logout()
webnotes.conn.commit()
@webnotes.whitelist()
def uploadfile():