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

Computer graduation design Python+django housekeeping management system design (source code + system + mysql database + Lw document)

編輯:Python

項目介紹

隨著大家生活水平的提高,Housekeeping services are becoming more and more popular in life,How to choose a good employee has become more and more important,How to let people find their own satisfactory housekeeping staff without leaving home is the main problem to be solved by this website,We establish a housekeeping company information system to realize the means for the demander to quickly obtain the correct and real housekeeping service information from the website,So it is very important to develop a friendly housekeeping company information system.
目前,Most of the search for the right housekeeping staff still stays in the traditional way of going to the housekeeping company for information and choosing,This way wastes a lot of time,It is also impossible to understand the service level and status of the domestic staff very well,It is very convenient to use the Internet to establish a housekeeping company information system to find housekeepers who meet their own conditions,有更多的選擇性,Because the housekeeping company information system is operated by a third party,Therefore, the information on your domestic staff provided on the platform is an objective description and evaluation,Will not be exaggerated by the housekeeping company.

開發環境

計算機畢業設計Python+djangoThe design of the housekeeping management system(源碼+系統+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