# coding:utf-8
__author__ = "ila"
import os,sys
from django.http import JsonResponse, HttpResponse
from django.apps import apps
def index(request):
if request.method in ["GET", "POST"]:
msg = {"code": 200, "msg": "success", "data": []}
print("=================>index")
# allModels = apps.get_app_config('main').get_models()
# for m in allModels:
# print(m.__tablename__)
# print(dir(m))
# # for col in m._meta.fields:
# # print("col name============>",col.name)
# # print("col type============>",col.get_internal_type())
# print(allModels)
return JsonResponse(msg)
def test(request, p1):
if request.method in ["GET", "POST"]:
msg = {"code": 200, "msg": "success", "data": []}
print("=================>index ", p1)
return JsonResponse(msg)
def null(request,):
if request.method in ["GET", "POST"]:
msg = {"code": 200, "msg": "success", "data": []}
return JsonResponse(msg)
def check_suffix(filelName,path1):
try:
image_data = open(path1, "rb").read()
except:
image_data = "no file"
if '.js' in filelName:
return HttpResponse(image_data, content_type="application/javascript")
elif '.jpg' in filelName or '.jpeg' in filelName or '.png' in filelName or '.gif' in filelName:
return HttpResponse(image_data, content_type="image/png")
elif '.css' in filelName:
return HttpResponse(image_data, content_type="text/css")
elif '.ttf' in filelName or '.woff' in filelName:
return HttpResponse(image_data, content_type="application/octet-stream")
elif '.mp4' in filelName:
return HttpResponse(image_data, content_type="video/mp4")
elif '.mp3' in filelName:
return HttpResponse(image_data, content_type="audio/mp3")
elif '.csv' in filelName:
return HttpResponse(image_data, content_type="application/CSV")
elif '.doc' in filelName:
return HttpResponse(image_data, content_type="application/msword")
elif '.docx' in filelName:
return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.wordprocessingml.document")
elif '.xls' in filelName:
return HttpResponse(image_data, content_type="application/vnd.ms-excel")
elif '.xlsx' in filelName:
return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
elif '.ppt' in filelName:
return HttpResponse(image_data, content_type="application/vnd.ms-powerpoint")
elif '.pptx' in filelName:
return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.presentationml.presentation")
elif '.zip' in filelName:
return HttpResponse(image_data, content_type="application/x-zip-compressed")
elif '.rar' in filelName:
return HttpResponse(image_data, content_type="application/octet-stream")
else:
return HttpResponse(image_data, content_type="text/html")
def admin_lib2(request, p1, p2):
if request.method in ["GET", "POST"]:
fullPath = request.get_full_path()
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2)
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
# try:
# image_data = open(path1, "rb").read()
# except:
# image_data="no file"
# if '.js' in p2:
# return HttpResponse(image_data, content_type="application/javascript")
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
# return HttpResponse(image_data, content_type="image/png")
# elif '.css' in p2:
# return HttpResponse(image_data, content_type="text/css")
# elif '.ttf' in p2 or '.woff' in p2:
# return HttpResponse(image_data, content_type="application/octet-stream")
# elif '.mp4' in p2:
# return HttpResponse(image_data, content_type="video/mp4")
# elif '.mp3' in p2:
# return HttpResponse(image_data, content_type="audio/mp3")
# else:
# return HttpResponse(image_data, content_type="text/html")
def admin_lib3(request, p1, p2, p3):
if request.method in ["GET", "POST"]:
fullPath = request.get_full_path()
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2, p3)
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
# try:
# image_data = open(path1, "rb").read()
# except:
# image_data="no file"
# if '.js' in p3:
# return HttpResponse(image_data, content_type="application/javascript")
# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
# return HttpResponse(image_data, content_type="image/png")
# elif '.css' in p3:
# return HttpResponse(image_data, content_type="text/css")
# elif '.ttf' in p3 or '.woff' in p3:
# return HttpResponse(image_data, content_type="application/octet-stream")
# elif '.mp4' in p3:
# return HttpResponse(image_data, content_type="video/mp4")
# elif '.mp3' in p3:
# return HttpResponse(image_data, content_type="audio/mp3")
# else:
# return HttpResponse(image_data, content_type="text/html")
def admin_lib4(request, p1, p2, p3, p4):
if request.method in ["GET", "POST"]:
fullPath = request.get_full_path()
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2, p3, p4)
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
# try:
# image_data = open(path1, "rb").read()
# except:
# image_data="no file"
# if '.js' in p4:
# return HttpResponse(image_data, content_type="application/javascript")
# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
# return HttpResponse(image_data, content_type="image/png")
# elif '.css' in p4:
# return HttpResponse(image_data, content_type="text/css")
# elif '.ttf' in p4 or '.woff' in p4:
# return HttpResponse(image_data, content_type="application/octet-stream")
# elif '.mp4' in p4:
# return HttpResponse(image_data, content_type="video/mp4")
# elif '.mp3' in p4:
# return HttpResponse(image_data, content_type="audio/mp3")
# else:
# return HttpResponse(image_data, content_type="text/html")
def admin_page(request, p1):
if request.method in ["GET", "POST"]:
fullPath = request.get_full_path()
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
path1 = os.path.join(os.getcwd(), "templates/front/admin/page/", p1)
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
# try:
# image_data = open(path1, "rb").read()
# except:
# image_data="no file"
# if '.js' in p1:
# return HttpResponse(image_data, content_type="application/javascript")
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
# return HttpResponse(image_data, content_type="image/png")
# elif '.css' in p1:
# return HttpResponse(image_data, content_type="text/css")
# elif '.ttf' in p1 or '.woff' in p1:
# return HttpResponse(image_data, content_type="application/octet-stream")
# elif '.mp4' in p1
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
小程序开发说明 开发语言:Java 框架:ssm JDK版本:JDK1.8 服务器:tomcat7 数据库:mysql 5.7(一定要5.7版本) 数据库工具:Navicat11 开发软件:eclipse/myeclipse/idea Maven包:Maven3.3.9 浏览器:谷歌浏览器 小程序框架:uniapp 小程序开发软件:HBuilder X 小程序运行软件:微信开发者 微信小程序配置环境链接:https://pan.baidu.com/s/1TAzjNmxQ0RfJpVIjlxh_gQ 后台路径地址:localhost:8080/项目名称/admin/dist/index.html 管理员账号:abo 管理员密码:abo
资源推荐
资源详情
资源评论
收起资源包目录
毕设-django基于微信平台小区服务系统-源码.rar (1558个子文件)
main.css.bak 63KB
update-password.vue.bak 3KB
IndexMain.vue.bak 2KB
IndexAsideStatic.vue.bak 2KB
BreadCrumbs.vue.bak 2KB
IndexHeader.vue.bak 2KB
安装.bat 429B
运行.bat 59B
3-build.bat 15B
2-run.bat 14B
1-install.bat 12B
app.8b40d34f.css 274KB
app.7b6aca6c.css 273KB
index.2d26d90a.css 79KB
icon.css 70KB
main.css 64KB
chunk-vendors.a72b0961.css 37KB
global-restaurant.css 7KB
mescroll-uni.css 4KB
animation.css 3KB
canvas-bg-1.css 391B
canvas-bg-2.css 83B
canvas-bg-3.css 61B
app或者微信小程序开发文档.docx 13KB
index.html 1KB
index.html 942B
index.html 571B
favicon.ico 4KB
favicon.ico 4KB
config.ini 152B
face.jpeg 51KB
face.jpeg 51KB
face.jpeg 51KB
face.jpeg 51KB
bg.jpg 4.12MB
picture2.jpg 974KB
picture3.jpg 926KB
news_picture6.jpg 918KB
picture1.jpg 868KB
shangpinxinxi_tupian5.jpg 241KB
jiaofeixinxi_tupian4.jpg 231KB
messages_cpicture6.jpg 183KB
messages_rpicture6.jpg 183KB
news_picture2.jpg 160KB
cheweixinxi_cheweitupian3.jpg 137KB
shangpinxinxi_tupian4.jpg 66KB
shangpinxinxi_tupian1.jpg 66KB
messages_cpicture3.jpg 63KB
messages_rpicture3.jpg 63KB
shangpinxinxi_tupian6.jpg 54KB
messages_cpicture4.jpg 54KB
messages_rpicture4.jpg 54KB
ruchangxinxi_cheweitupian4.jpg 47KB
news_picture4.jpg 46KB
shangpinxinxi_tupian2.jpg 43KB
shangpinxinxi_tupian3.jpg 43KB
news_picture5.jpg 41KB
news_picture3.jpg 39KB
messages_rpicture1.jpg 38KB
messages_cpicture1.jpg 38KB
banner.jpg 35KB
cheweixinxi_cheweitupian2.jpg 32KB
news_picture1.jpg 32KB
cheweixinxi_cheweitupian5.jpg 26KB
cheweixinxi_cheweitupian4.jpg 25KB
messages_rpicture5.jpg 24KB
messages_cpicture5.jpg 24KB
jiaofeixinxi_tupian1.jpg 22KB
jiaofeixinxi_tupian6.jpg 22KB
jiaofeixinxi_tupian3.jpg 22KB
jiaofeixinxi_tupian2.jpg 21KB
jiaofeixinxi_tupian5.jpg 20KB
ruchangxinxi_cheweitupian6.jpg 16KB
ruchangxinxi_cheweitupian2.jpg 16KB
ruchangxinxi_cheweitupian1.jpg 13KB
cheweixinxi_cheweitupian1.jpg 13KB
ruchangxinxi_cheweitupian3.jpg 12KB
messages_rpicture2.jpg 10KB
messages_cpicture2.jpg 10KB
cheweixinxi_cheweitupian6.jpg 9KB
ruchangxinxi_cheweitupian5.jpg 9KB
captcha.jpg 5KB
captcha.jpg 5KB
captcha.jpg 5KB
captcha.jpg 5KB
captcha.jpg 3KB
chunk-vendors.e67a9317.js 1.99MB
app.0c493ecd.js 863KB
app.819d82cc.js 817KB
chunk-vendors.55d83820.js 563KB
index.7461a21c.js 278KB
index.fef79723.js 275KB
vendor.js 261KB
vendor.js 261KB
area.js 223KB
pages-cheweixinxi-add-or-update~pages-chuchangxinxi-add-or-update~pages-discusscheweixinxi-add-or-up~fa0145ab.154e9cc2.js 166KB
pages-cheweixinxi-add-or-update~pages-chuchangxinxi-add-or-update~pages-discusscheweixinxi-add-or-up~70136ea7.01fa6359.js 166KB
pages-index-index.aae8f9ae.js 95KB
pages-index-index.7719eba2.js 95KB
qrcode.js 43KB
共 1558 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16
资源评论
毕设王同学
- 粉丝: 127
- 资源: 1193
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 光纤到户及通信基础设施报装申请表.docx
- 踝关节功能丧失程度评定表.docx
- 环保设施投资估算表.docx
- 既有建筑物通信报装申请表.docx
- 既有建筑物通信报装现场查勘报告.docx
- 监督机构检查记录表.docx
- 肩关节功能丧失程度评定表.docx
- 大学生创新创业训练计划大创项目的全流程指南
- 简易低风险工业厂房通信报装申请表.docx
- 建设工程消防验收各阶段意见回复表.docx
- 建设工程消防验收模拟验收意见表.docx
- 建设工程消防验收图纸核查意见表.docx
- 建设工程消防验收现场指导意见表.docx
- 建筑工程竣工验收消防设计质量检查报告(表格填写模板).docx
- 建筑工程消防查验意见和结论.docx
- 建筑工程消防施工竣工报告(表格填写模板).docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功