项目作者: Rotendahl

项目描述 :
A cashier system for a Dormitory
高级语言: Python
项目地址: git://github.com/Rotendahl/DormitoryLife.git
创建时间: 2017-03-31T22:11:37Z
项目社区:https://github.com/Rotendahl/DormitoryLife

开源协议:GNU General Public License v3.0

下载


Cashier system

A system to assist the cashier at a dormitory. It keeps track of transactions
and presents them in a web interface.

" class="reference-link">Screenshot

How it works.

In the admin interface you can enter the rooms in the dormitory and the contact
info of the person living there. The admin interface can also be used to enter
transactions.
A summery of all rooms and transactions is then presented on the main page and
the transactions for a specific room can be seen on their overview page.

Setup

Local installation

The system is coded in django and is setup
such that it can be easily deployed on a Heroku server.

To get a local version up and running perform the following steps.

  • Install a version of python 3 (The server is set to python 3.6.1).
  • Clone this repo and open a terminal in the same folder.
  • Create a virtual environment and install the dependencies with the
    following commands
    1. $ pip install virtualenv
    2. $ virtualenv -p `which python3` virtualenv
    3. $ source virtualenv/bin/activate
    4. $ pip install -r requirements.txt
  • The next step is to create the database with these commands
    1. $ ./manage.py migrate
    2. $ ./maange.py createsuperuser
    3. $ ./manage.py runserver

Heroku deployment

Once you have made an account on Heroku you can run
the following commands.

  1. $ heroku login
  2. $ heroku create # This step gives you a URL for the instance
  3. $ git push heroku master
  4. $ heroku run python manage.py migrate
  5. $ heroku run python manage.py createsuperuser

You can now visit the URL shown in step two and login at something.heroku.com/admin

Contributing

Pull requests are more than welcome, bonus point if the code conforms to
pylint.

  • Testing:
    There is a small test suite that can be run with the command
    ./mange.py test To check if you new code is covered by tests you can run:
    1. $ coverage run --source='.' manage.py test cashier
    2. $ coverage html
    This will create a htmlcov directory where you can open the file
    index.html
  • Docs: There is also limited documentation available by going into the
    docs dir and typing make html