diff --git a/client-barcode/doc/freitagskasse.svg b/client-barcode/doc/freitagskasse.svg index d98e018..e6d543c 100644 --- a/client-barcode/doc/freitagskasse.svg +++ b/client-barcode/doc/freitagskasse.svg @@ -16,7 +16,7 @@ inkscape:version="0.48.2 r9819" sodipodi:docname="freitagskasse.svg"> HOWTO Freitagskasse v3.1 + id="title3609">HOWTO Freitagskasse v3.2 image/svg+xml - HOWTO Freitagskasse v3.1 + HOWTO Freitagskasse v3.2 Sebastian Pipping <sebastian@pipping.org> @@ -1054,7 +1054,8 @@ id="rect3535-9" />1 Euro + id="g6092" + transform="translate(-1.09375e-6,0)"> 10 Euro + transform="translate(-3.9999988,0)"> COMMIT + transform="translate(-19.933595,0)"> UNDO + id="flowPara3537-0-75-7">STORNO = 1.3 + - python-django-auth-ldap + - python-django-piston + - easy-thumbnails + https://github.com/SmileyChris/easy-thumbnails.git Installation Process ==================== + +1. Webserver + +Some sort of Webserver is needed to host the django part. All about deploying +django can be found at https://docs.djangoproject.com/en/dev/howto/deployment/ +Mostly this will be apache2 + mod_wsgi. + +k4ever has static files which should be served by the webserver directly, so +be sure to turn off python for the media/ directory. + +For development there is also djangos builtin webserver. You can use it via +./manage.py runserver but THIS SHOULD NEVER BE USED IN A PRODOCTIVE +ENVIRONMENT. + + + +2. The database - edit settings.py for database - Add Usergroups: ('Normal User', 'Plugin') ( to be renamed) - ./manage.py syncdb + - install script for needed data will be written. + + +Documentation +============= +Yes, there is more documentation than this readme! It is present +at k4ever/docs/, but if you want (and have python-sphinx) installed, +you can compile it to nice html (or pdf, ...) pages. There is a +``Makefile`` present to your assistance. -API -=== diff --git a/devel/TODO b/devel/TODO index 49b7482..7c1f58d 100644 --- a/devel/TODO +++ b/devel/TODO @@ -11,25 +11,25 @@ Noch zu tun: [x] doku [x] API(wget)-Beispiele [ ] Authblob erlaubt momentan beliebige größe - beschrängen auf 10kb o.ä. -[ ] API erlauben mehrere Items auf eine Order zu setzen (und damit auch deposit zu getränk zu kaufen) +[x] API erlauben mehrere Items auf eine Order zu setzen (und damit auch deposit zu getränk zu kaufen) Todo bis release: - - artikel in datenbank (wir oder gemeinschaftlich am freitag?) - - barcode client (sping) - - pfand fuer barcode client - - guter erklärender plugintext - - startseite (konrad?) - - beliebte items mit kaufoption, eventuell sortiert nach drei gruppen wie (Getränke, Essen, [Anderes]) oder (Getränke, Süßes, Salziges, [Anderes]) - - einkaufsseite - - alle items, sortierung nach preis/alphabet - - suchfeld fixen (konrad?) -[x] image aspect ration checking und/oder irgendwo hinschreiben (seba) - - transaktionsseite schöner machen - - pluginseite (einstellungen) schöner machen - - history: items durch bilder ersetzen, pfand drunterschreiben wenn pfand... + [/] artikel in datenbank (wir oder gemeinschaftlich am freitag?) + [ ] barcode client (sping) + [x] pfand fuer barcode client + [ ] guter erklärender plugintext + [x] startseite + [x] beliebte items mit kaufoption, eventuell sortiert nach drei gruppen wie (Getränke, Essen, [Anderes]) oder (Getränke, Süßes, Salziges, [Anderes]) + [x] einkaufsseite + [x] alle items, sortierung nach preis/alphabet + [x] suchfeld fixen (konrad?) + [x] image aspect ration checking und/oder irgendwo hinschreiben (seba) + [x] transaktionsseite schöner machen + [x] pluginseite (einstellungen) schöner machen + [x] history: items durch bilder ersetzen, pfand drunterschreiben wenn pfand... - apidocs probelesen - icons auf startseite unter loginfeld - - blabla zum kassensystem fuer docs (tannek, seba) + [ ] blabla zum kassensystem fuer docs Nice-to-haf: @@ -48,8 +48,6 @@ Open for discussion: - 15, besser 20:Man sucht auf ja nach etwas und will sich nicht totklicken ~~~TKroenert Konrad: - Abmeldebutton rechts oder rot? - - die liste der zu einkaufenden items ist doof :( - - /store/history/ ist noch kaputt + zeit unformatiert - - /transaction/ sehen die gemachten transactions noch nicht so cool aus - in js verhindern, das wer durch doppelklick auf "KAUFEN" das ding 2x kauft(also 2x http request abgesetzt werden) + - BUG: Auf der HOME-seite ist das Bild direkt neben "SNACKS" nicht als link anklickbar + - BUG: directBuy-anzeige ist z.B. auf der HOME-seite hinter den "Kauf"-Buttons diff --git a/devel/er-core.dia b/devel/er-core.dia deleted file mode 100644 index 1da9896..0000000 Binary files a/devel/er-core.dia and /dev/null differ diff --git a/devel/konzept b/devel/konzept deleted file mode 100644 index ad2c257..0000000 --- a/devel/konzept +++ /dev/null @@ -1,15 +0,0 @@ -django gibt tabellenstruktur vor - -webinterface - mit django - fuer - adminsistration - user preferences - kaufen - undsoweiter - d.h. voller funktionsumfang - - --- milestone 2 -touchinterface am kuehlschrank - möglichst simpel diff --git a/devel/map.html b/devel/map.html new file mode 100644 index 0000000..6da4895 --- /dev/null +++ b/devel/map.html @@ -0,0 +1,54 @@ +New Map + + + +
+ + + + + + + + + + + + + +
\ No newline at end of file diff --git a/devel/map.png b/devel/map.png new file mode 100644 index 0000000..1c78539 Binary files /dev/null and b/devel/map.png differ diff --git a/k4ever/api2/handlers.py b/k4ever/api2/handlers.py index 9f64a33..cfc5c71 100644 --- a/k4ever/api2/handlers.py +++ b/k4ever/api2/handlers.py @@ -92,6 +92,10 @@ class BuyableItemHandler(BaseHandler): amount = getInt(request.data, 'amount', 1) if amount < 1: return rc.BAD_REQUEST + if amount > 30: + ret = rc.BAD_REQUEST + ret.write("\nYou are trying to buy more than 30 items at once. This is not permitted. If you think it should, mail the admins / fix this in the handlers.py\n"); + return ret if (not item.hasDeposit() and deposit != self.BUY_ITEM) or \ deposit not in (self.BUY_ITEM, self.BUY_DEPOSIT, self.BUY_ITEM_AND_DEPOSIT): return rc.BAD_REQUEST @@ -145,6 +149,11 @@ class BuyableItemHandler(BaseHandler): ret.write("\nThe items/deposists parameter have to be a list.\n") return ret + if len(itemList) > 30: + ret = rc.BAD_REQUEST + ret.write("\nYou are trying to buy more than 30 items at once. This is not permitted. If you think it should, mail the admins / fix this in the handlers.py\n"); + return ret + if len(itemList) == 0: ret = rc.BAD_REQUEST ret.write("\nYour request contains no items/deposits.\n") @@ -251,9 +260,9 @@ class TransactionTransactHandler(BaseHandler): amount = getDecimal(request.POST, 'amount', Decimal(0)) tTypeId = getInt(request.POST, 'type', -1) - if amount <= 0: + if amount < Decimal("0.01"): ret = rc.BAD_REQUEST - rc.write("\nA negative amount is not supported right now (there has not been put enough thought into the 'lending money' process\n") + ret.write("\nA negative amount (or zeroed) is not supported right now (there has not been put enough thought into the 'lending money' process\n") return ret tType = None try: diff --git a/k4ever/buyable/templates/buyables/history.html b/k4ever/buyable/templates/buyables/history.html index d777fd6..300ea8c 100644 --- a/k4ever/buyable/templates/buyables/history.html +++ b/k4ever/buyable/templates/buyables/history.html @@ -1,8 +1,12 @@ {% extends "base.html" %} +{% load thumbnail %} + {% block "content" %} {% if history %} -

Frühere Einkäufe von {{ user }}

+
+

Frühere Einkäufe von {{ user }}

+