Giter Club home page Giter Club logo

orthosie's Introduction

Build Status License

Copyright 2013 Jack David Baucum

This file is part of Orthosie.

Orthosie is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Orthosie is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Orthosie.  If not, see <http://www.gnu.org/licenses/>.

Orthosie is licensed under the GPLv3. The details of this license can be viewed at http://gplv3.fsf.org/

About

Orthosie is a point of sale system written in Python using the Django framework. Orthosie supports Python 3 and Django 1.10

Supported Systems

Orthosie should work on any operating system and any hardware that can run python3 and the Django 1.8 framework. It is only tested to work with Chrome/Chromium and Midori web browsers. Patches and pull requests to fix bugs in any other browsers are always welcome as long as they don't add any undo clutter to the codebase.

Install

These instructions are for debian-based versions of GNU/Linux. It is recommended that you use virtualenvwrapper to segment the orthosie libraries from the rest of your python environment.

Required Packages

sudo apt-get install python3 python3-pip python3-setuptools git 

VirtualEnvWrapper

sudo pip3 install virtualenvwrapper
mkdir ~/virtualenvs

Add the following to your shell init script. e.g. ~/.bashrc or ~/.zshrc

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export WORKON_HOME=~/virtualenvs

Initialize virtualwrapper

source /usr/local/bin/virtualenvwrapper.sh

Create a virtual environment for Orthosie.

mkvirtualenv orthosie

Orthosie

cd ~
git clone https://github.com/maxolasersquad/orthosie.git

Pip Packages

cd orthosie
pip install -r requirements/common.txt
pip install -r requirements/dev.txt
pip install -r requirements/prod.txt

SQLite Database

Getting Orthosie running for the first time requires we setup the sqlite database file. If you have a different database you want to use, refer to the django documentation at https://docs.djangoproject.com/en/1.10/ref/databases/

python3 manage.py makemigrations
python3 manage.py migrate

Running

To run the test server cd in to the orthosie directory and run the following.

python3 manage.py runserver

At this point you can browse to http://127.0.0.1:8000/register/ to see the register.

This server should only be used for testing your setup and maybe even an initial configuration. For your production setup you should use nginx, Apache, or any other webserver of your choosing.

Nginx

The following article explains setting up nginx on Ubuntu to connect to a django application. http://grokcode.com/784/

Apache2

The following article explains setting up Apache2 on Ubuntu to connect to a django application. https://www.digitalocean.com/community/articles/using-mod_wsgi-to-serve-applications-on-ubuntu-12-04

Adding Inventory

You can modify existing inventory from http://127.0.0.1:8000/inventory/

Running the Register

The register is located at http://127.0.0.1:8000/register/ You should be able to ring up this product. Note that during the ring the UPC checksum is needed for a ring to go through properly, so you will need to input '008274000061' for the ring to work.

Other Licenses

Django

Licensed BSD. More information at https://github.com/django/django/blob/master/LICENSE

Font-Awesome

Licensed SIL OFL 1.1 and MIT. More information at http://fontawesome.io/license/

Bootstrap

Licensed MIT. More information at https://github.com/twbs/bootstrap/blob/master/LICENSE

jQuery

Licenses MIT. More information at https://jquery.org/license/

Chat

Join the chat at https://gitter.im/maxolasersquad/orthosie

orthosie's People

Contributors

eracle avatar kkoci avatar maxolasersquad avatar ryantfowler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orthosie's Issues

problems while executing

Installed everything in ubuntu but I got this:

python3 manage.py makemigrations
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/vagrant/www/orthosie/venv/lib/python3.4/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "/vagrant/www/orthosie/venv/lib/python3.4/site-packages/django/core/management/__init__.py", line 347, in execute
    django.setup()
  File "/vagrant/www/orthosie/venv/lib/python3.4/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/vagrant/www/orthosie/venv/lib/python3.4/site-packages/django/apps/registry.py", line 112, in populate
    app_config.import_models()
  File "/vagrant/www/orthosie/venv/lib/python3.4/site-packages/django/apps/config.py", line 198, in import_models
    self.models_module = import_module(models_module_name)
  File "/vagrant/www/orthosie/venv/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/vagrant/www/orthosie/register/models.py", line 75, in <module>
    class Transaction(models.Model):
  File "/vagrant/www/orthosie/register/models.py", line 76, in Transaction
    shift = models.ForeignKey(Shift)
TypeError: __init__() missing 1 required positional argument: 'on_delete'

TemplateDoesNotExist at /register

Hi!
I'm trying to deploy the project using python 3.4.3, a separate virtualenv with the requirements suggested, I'm actually installed all the requirements in common.txt dev.txt and prod.txt.
I'm using on my local machine Ubuntu 14.04

With packages in this virtualenv:
Django (1.10.1)
djangorestframework (3.4.6)
pep8 (1.7.0)
pip (8.1.2)
pyflakes (1.3.0)
python-memcached (1.58)
setuptools (27.1.2)
six (1.10.0)
wheel (0.29.0)

After that I searched for the manage.py's syncdb command, but unfortunately I didn't find it, so I run makemigrations and then migrate commands as this post points out.

Now, when I run the server and I access to the register page I get this error:

`
Environment:

Request Method: GET
Request URL: http://localhost:8000/register/

Django Version: 1.10.1
Python Version: 3.4.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'register',
'inventory')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Template loader postmortem
Django tried loading these templates, in this order:

Using engine :
This engine did not provide a list of tried templates.

Traceback:

File "/home/eracle/python/virtualenvs/orthosie/lib/python3.4/site-packages/django/core/handlers/exception.py" in inner

  1.         response = get_response(request)
    

File "/home/eracle/python/virtualenvs/orthosie/lib/python3.4/site-packages/django/core/handlers/base.py" in _legacy_get_response

  1.         response = self._get_response(request)
    

File "/home/eracle/python/virtualenvs/orthosie/lib/python3.4/site-packages/django/core/handlers/base.py" in _get_response

  1.             response = self.process_exception_by_middleware(e, request)
    

File "/home/eracle/python/virtualenvs/orthosie/lib/python3.4/site-packages/django/core/handlers/base.py" in _get_response

  1.             response = wrapped_callback(request, _callback_args, *_callback_kwargs)
    

File "/home/eracle/python/projects/orthosie/register/views.py" in index

  1. return render(request, 'register/index.html', context)
    

File "/home/eracle/python/virtualenvs/orthosie/lib/python3.4/site-packages/django/shortcuts.py" in render

  1. content = loader.render_to_string(template_name, context, request, using=using)
    

File "/home/eracle/python/virtualenvs/orthosie/lib/python3.4/site-packages/django/template/loader.py" in render_to_string

  1.     template = get_template(template_name, using=using)
    

File "/home/eracle/python/virtualenvs/orthosie/lib/python3.4/site-packages/django/template/loader.py" in get_template

  1. raise TemplateDoesNotExist(template_name, chain=chain)
    

Exception Type: TemplateDoesNotExist at /register/
Exception Value: register/index.html
`

I think is related with how this django version search for the template dir.
I'm quite new with django, so after some experience I can try to afford the problem in a better way.

End shift

A shift needs to be able to ended. Shift totals will be generate and printed and then a new shift should be created.

Print receipts

At the end of each transaction a receipt needs to print.

Product Search

Need to be able to search for a product and ring up a selected search result.

Issue when migrate - runserver etc

Hi again

I was retaking this project after a while, really busy over here lately.

BTW, after I've cloned the actual project, now I can't run migrate or runserver, etc

Because of this:

''Unhandled exception in thread started by <function wrapper at 0xb6773f7c>
Traceback (most recent call last):
File "/home/kkoci/.virtualenvs/orthosie/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(_args, *_kwargs)
File "/home/kkoci/.virtualenvs/orthosie/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/home/kkoci/.virtualenvs/orthosie/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
six.reraise(__exception)
File "/home/kkoci/.virtualenvs/orthosie/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(_args, **kwargs)
File "/home/kkoci/.virtualenvs/orthosie/local/lib/python2.7/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/kkoci/.virtualenvs/orthosie/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/home/kkoci/.virtualenvs/orthosie/local/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/home/kkoci/python_examples/orthosie/register/models.py", line 69
z.print()
^
SyntaxError: invalid syntax
'''

Is this related to the Python version?

I'm using pyenv, with python 3.3.1

Thank You

Best Regards

Requirements

Hi, I'm trying to run this app, I already have Python 3.3.1 installed on my machine. (Win 7)

Made a virtualenv, but no requirements file is in, could you please provide one?

Thanks in advance!

Cancel ring

If an item is rung up, it should be possible to cancel it out by inserting another entry with the opposite price, effectively zeroing it out.

Ring up item with PLU

Inventory that has a PLU code, instead of a CPU, should be able to be rung up properly.

Feature request: touch screen capable 'caffe' interface

My use case is a caffe environment where the primary trade is coffee, but other items such as cakes and wholesale produce are sold as well. This use case differs from the current register app which I feel is currently more of a 'check out' style application.

My idea is the following:

An interface which has a grid of buttons which are linked to items and item modifiers. When an item button is pressed the item is added to the current transaction. When a modifier button is pressed, extra detail is added to the item (and extra cost if appropriate).

As an example consider the process of ringing up an order for a coffee:

You could add an item: coffee
then you could add a modifier: skim milk
etc...

It is possible that modifiers have an added cost associated with them:

Coffee $3.00

  • skim milk
  • extra shot $0.50

When the order is complete there is an option to print a order docket which would be in this case passed onto the barista and in addition there is an option to print a tax receipt for the customer. These two print outs would differ in detail.

As a note this is what im designing the system around / to support (working with what I've been given):

  • Apple iPad
  • Heckler Design Windfall POS Cash Drawer
  • Epson TM-T82II Ethernet Thermal Receipt Printer
  • Server (details TBA but most likely an Odroid XU3 running Ubuntu)

Image

Is there any interest in having this sort of use case supported? At the moment I'm hacking my way through an initial proof of concept which I'm happy to contribute back to the repo.

My pan is to make a separate app within orthosie and use the existing inventory system.

Input is welcome!

Gitter: Add a Gitter channel

Any thoughts on adding a Gitter channel? I've found it to be quite useful for other projects to float ideas and ask questions.

Django 1.6 or 1.7 support.

Need to make sure everything works fine in Django 1.6.
If Django 1.7 is out in time it should work in 1.7 instead.

Specify Django REST Framework version in requeriments

DRF is a library in constant development and every version have changes and deprecations in the API, right now with the last current version(3.5.4) from pipy I'm getting a lot of errors like
AssertionError: ("Creating a ModelSerializer without either the 'fields' attribute or the 'exclude' attribute has been deprecated since 3.3.0, and is now disallowed. Add an explicit fields = '__all__' to the ItemSerializer serializer.",)
Maybe it's DRF, maybe it's other thing but I think the DRF version need to be set to one that we can be sure works with the project.
Thanks

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.