Coder Social home page Coder Social logo

fantuan's Introduction

饭团 (fantuan)

A simple fantuan financial tools based on django

Fantuan is a free software, you can use, modify or distribute it without restriction, visit http://whusnoopy.github.io/fantuan/LICENSE.html for more detail

一个简单的基于 django 的饭团记账系统

饭团是一个自由软件, 您可以免费使用, 修改和再分发, 详见 http://whusnoopy.github.io/fantuan/LICENSE.html

环境依赖

系统环境

  • python2.7 (运行 django 所需环境)
  • sqlite3 (本地数据库)

Python 库

  • django (基于 django 1.5 开发, 其他版本没做测试)
  • python-flup (用 fastcgi 模式运行 django)

安装运行

获取代码

git clone 本项目, 进入目录

$ git clone https://github.com/whusnoopy/fantuan.git
$ cd fantuan

建立开发运行环境

$ virtualenv ve
$ source ve/bin/activate
$ pip install -r requirements.txt

生成本地数据库

$ python manage.py syncdb

可修改 fantuan/settings.py 里 sqlite 本地数据库的地址

启动

$ python manager.py runserver 0.0.0.0:8000

fastcgi + nginx 模式运行

静态文件汇集

$ python manager.py collectstatic

修改 nginx 的转发规则

下面是一个 nginx conf 文件样例:

server {
    listen 80;
    server_name fantuan.yourdomain.com;

    # fastcgi 参数传递 修改为自己的路径
    location / {
      include fastcgi_params;
      fastcgi_split_path_info ^()(.*)$;
      fastcgi_pass unix:/home/yourname/fantuan/fastcgi.sock;
    }

    # 静态文件重定向, 修改为自己的路径
    location /static/admin/ {
      alias /home/yourname/fantuan/static/;
      expires 30d;
    }
}

运行

$ sh start_fantuan.sh

停止服务

$ sh start_fantuan.sh stop

使用指南

使用 http://yourdomain.com 来访问查看, 通过 http://yourdomain.com/admin 来管理

建议只对 [消费记录] 做添加修改操作, 注意事项在管理界面里有内嵌提示, [餐厅] 和 [人员] 可以在 [消费记录] 里更改

支持转账操作, 自行添加一个 [转账] 的虚拟餐厅, 转账的消费记录里, 付款人选转出者, 参与人选转入者 (其他人都不选), 则可以保持账面平衡

fantuan's People

Contributors

whusnoopy avatar

Watchers

 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.