Skip to content

Rotendahl/DormitoryLife

Repository files navigation

Cashier system

A system to assist the cashier at a dormitory. It keeps track of transactions and presents them in a web interface. 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
$ pip install virtualenv
$ virtualenv -p `which python3` virtualenv
$ source virtualenv/bin/activate
$ pip install -r requirements.txt
  • The next step is to create the database with these commands
$ ./manage.py migrate
$ ./maange.py createsuperuser
$ ./manage.py runserver

Heroku deployment

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

 $ heroku login
 $ heroku create # This step gives you a URL for the instance
 $ git push heroku master
 $ heroku run python manage.py migrate
 $ 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:
    $ coverage run --source='.' manage.py test cashier
    $ 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

Releases

No releases published

Packages

No packages published

Languages