程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

計算機畢業設計Python+django的家政管理系統設計(源碼+系統+mysql數據庫+Lw文檔)

編輯:Python

項目介紹

隨著大家生活水平的提高,在生活中家政服務變得越來越受大家的歡迎,如何來選擇一個好的員工就也變得越來越重要,如何讓人們足不出戶就能找到自己滿意的家政人員是本網站要解決的主要問題,我們建立一個家政公司信息系統來實現需求者從網站中快速的獲取正確真實的家政服務信息的手段,所以開發一個友好的家政公司信息系統就顯得非常重要。
目前,大多數的尋找合適的家政人員還停留在去家政公司資訊並選擇的傳統方式,這樣的方式浪費了大量的時間,也不能很好的了解家政人員的服務水平和狀態,利用互聯網建立一個家政公司信息系統來尋找符合自己條件的家政人員非常的方便,有更多的選擇性,由於家政公司信息系統由第三方來運營,所以平台上提供你的家政人員信息都是客觀的描述和評價,不會遭到家政公司的誇大。

開發環境

計算機畢業設計Python+django的家政管理系統設計(源碼+系統+mysql數據庫+Lw文檔)
開發語言:Python
python框架:django
軟件版本:python3.7/python3.8
數據庫:mysql 5.7或更高版本
數據庫工具:Navicat11
開發軟件:PyCharm/vs code
前端框架:vue.js
可開發框架:ssm/Springboot/vue/python/PHP/小程序/安卓均可開發

系統截圖




核心代碼

def xuqiuzhongxin_register(request):
if request.method in ["POST", "GET"]:
msg = {
'code': normal_code, "msg": mes.normal_code}
req_dict = request.session.get("req_dict")
error = xuqiuzhongxin.createbyreq(xuqiuzhongxin, xuqiuzhongxin, req_dict)
if error != None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def xuqiuzhongxin_login(request):
if request.method in ["POST", "GET"]:
msg = {
'code': normal_code, "msg": mes.normal_code}
req_dict = request.session.get("req_dict")
datas = xuqiuzhongxin.getbyparams(xuqiuzhongxin, xuqiuzhongxin, req_dict)
if not datas:
msg['code'] = password_error_code
msg['msg'] = mes.password_error_code
return JsonResponse(msg)
req_dict['id'] = datas[0].get('id')
return Auth.authenticate(Auth, xuqiuzhongxin, req_dict)
def xuqiuzhongxin_logout(request):
if request.method in ["POST", "GET"]:
msg = {

"msg": "登出成功",
"code": 0
}
return JsonResponse(msg)
def xuqiuzhongxin_resetPass(request):
''' '''
if request.method in ["POST", "GET"]:
msg = {
"code": normal_code, "msg": mes.normal_code}
req_dict = request.session.get("req_dict")
error = xuqiuzhongxin.updatebyparams(xuqiuzhongxin,xuqiuzhongxin, req_dict)
if error != None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def xuqiuzhongxin_session(request):
''' '''
if request.method in ["POST", "GET"]:
msg = {
"code": normal_code,"msg": mes.normal_code, "data": {
}}
req_dict={
"id":request.session.get('params').get("id")}
msg['data'] = xuqiuzhongxin.getbyparams(xuqiuzhongxin, xuqiuzhongxin, req_dict)[0]
return JsonResponse(msg)
def xuqiuzhongxin_page(request):
''' '''
if request.method in ["POST", "GET"]:
msg = {
"code": normal_code, "msg": mes.normal_code, "data":{
"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
req_dict = request.session.get("req_dict")
#獲取全部列名
columns= xuqiuzhongxin.getallcolumn( xuqiuzhongxin, xuqiuzhongxin)
#當前登錄用戶所在表
tablename = request.session.get("tablename")
#當列屬性authTable有值(某個用戶表)[該列的列名必須和該用戶表的登陸字段名一致],則對應的表有個隱藏屬性authTable為”是”,那麼該用戶查看該表信息時,只能查看自己的
try:
__authTables__=xuqiuzhongxin.__authTables__
except:
__authTables__=None
if __authTables__!=None and __authTables__!={
}:
for authColumn,authTable in __authTables__.items():
if authTable==tablename:
params = request.session.get("params")
req_dict[authColumn]=params.get(authColumn)
break
#authColumn=list(__authTables__.keys())[0]
#authTable=__authTables__.get(authColumn)
# if authTable==tablename:
#params = request.session.get("params")
#req_dict[authColumn]=params.get(authColumn)
'''__authSeparate__此屬性為真,params添加userid,後台只查詢個人數據'''
try:
__authSeparate__=xuqiuzhongxin.__authSeparate__
except:
__authSeparate__=None
if __authSeparate__=="是":
tablename=request.session.get("tablename")
if tablename!="users" and 'userid' in columns:
try:
req_dict['userid']=request.session.get("params").get("id")
except:
pass
#當項目屬性hasMessage為”是”,生成系統自動生成留言板的表messages,同時該表的表屬性hasMessage也被設置為”是”,字段包括userid(用戶id),username(用戶名),content(留言內容),reply(回復)
#接口page需要區分權限,普通用戶查看自己的留言和回復記錄,管理員查看所有的留言和回復記錄
try:
__hasMessage__=xuqiuzhongxin.__hasMessage__
except:
__hasMessage__=None
if __hasMessage__=="是":
tablename=request.session.get("tablename")
if tablename!="users":
req_dict["userid"]=request.session.get("params").get("id")
if tablename == "users" and req_dict.get("userid") != None:
del req_dict["userid"]
else:
# 判斷當前表的表屬性isAdmin,為真則是管理員表
# 當表屬性isAdmin=”是”,刷出來的用戶表也是管理員,即page和list可以查看所有人的考試記錄(同時應用於其他表)
__isAdmin__ = None

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved