Git Product home page Git Product logo

hjs_cms's Introduction

##基于python开发的简易订单系统

这是受朋友之托帮忙开发的一个简易的订单系统。基本也没什么有创新可谈的,主要是它基于Python开发的高效特色框架。得益于实习期间跟随导师学了不要东西,该框架也是从他那学来的,在此十分感谢,算是领我这个菜鸟上道了^_^!整个开发差不多花了一周时间,从数据库,后台到前端,算是坑了一把,不过毕竟还是要经历才有收获。

1. 框架简述

该系统前端采用了RestAPI的设计,使用jQuery异步调取后端WEB接口的形式获取json的数据并渲染展示。 后端框架采用了base(基础类库层)、bean(后台逻辑层)、dao(数据持久层)、web(view展示层)的四层结构,代码结构清晰,高度模块化设计,使得开发起来高效、实用、可靠,并且便于扩展和维护。

下面是该系统的源码结构:

hjs_cms
├── bin/
├── conf/
├── src
│   ├── base/
│   ├── bean/
│   ├── dao/
│   ├── hjs_cfg.py
│   └── web
│       ├── sessions/
│       ├── static
│       │   ├── css/
│       │   ├── images/
│       │   └── js/
│       ├── templates/
│       ├── url.py
│       ├── viewset/
│       └── web_main.py
└── test/

2. 框架亮点

  • 高度模块化、结构化设计
  • 双返回值设计结构确保安全、可靠
  • 采用fabric自动化部署
  • 采用nose单元测试框架
  • 实现了标准规范的log模块
  • web.py 设计RestAPI
  • 采用JQuery 调用WEB API渲染展示
  • 采用nginx + gunicorn + web.py + supervisor 部署运行

3. 自动化部署

进入hjs_cms/install目录下,修改好远程服务器的业务配置环境(persion.conf)和远程服务器的ssh配置(secret.py),并行:

python publish_hjs_cms.py deploy $srv_ip

注意:

  1. 执行publish_hjs_cms.py之前需要将/tools/ssh.exp 添加到本地环变量中
  2. 在publish_hjs_cms.py脚本最后有重启supervisor的命令,这需要root权限才可以重启!
  3. 日志目录配置在根目录下logs下,重新部署后可能需要创建此目录

hjs_cms's People

Contributors

lingerhk avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.