瀏覽代碼

[wsgi] [minor] fixed request host name

version-14
Rushabh Mehta 12 年之前
父節點
當前提交
93ff8bf7f8
共有 3 個檔案被更改,包括 3 行新增2 行删除
  1. +1
    -1
      core/doctype/profile/profile.py
  2. +1
    -1
      webnotes/auth.py
  3. +1
    -0
      webnotes/handler.py

+ 1
- 1
core/doctype/profile/profile.py 查看文件

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


+ 1
- 1
webnotes/auth.py 查看文件

@@ -26,7 +26,7 @@ class HTTPRequest:
# override request method. All request to be of type POST, but if _type == "POST" then commit # override request method. All request to be of type POST, but if _type == "POST" then commit
if webnotes.form_dict.get("_type"): 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"] del webnotes.form_dict["_type"]


# set db # set db


+ 1
- 0
webnotes/handler.py 查看文件

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


@webnotes.whitelist() @webnotes.whitelist()
def uploadfile(): def uploadfile():


Loading…
取消
儲存