Go to file
Sebastian Lohff 851c85f4be Add piston install documentation 2020-03-17 23:08:35 +01:00
client-barcode Fixed: Called select module instead of function 2012-06-15 12:53:27 +02:00
devel removed old develgraphics for payment and deposit and added new ones 2012-07-11 18:46:55 +02:00
k4ever Requirements: Django 1.11, pistons, drf 2020-03-17 23:07:50 +01:00
preislister Preislister: Datum oben auf jeder Seite (mit fancyhdr), Ränder neu anpassen 2012-05-16 22:31:46 +02:00
rfid RFID: License under "GPL v3 or later" (with acknoledgement from Andy) 2011-10-19 04:50:05 +02:00
.gitignore Migration to Django 1.10 2018-10-24 01:03:53 +02:00
README.piston Add piston install documentation 2020-03-17 23:08:35 +01:00


Django piston is pretty old and does not work with django1.11 out of the box.
For the transition these are the changes required to get piston working

Start out by creating a new virtualenv, install the requirements, then change the following lines:

In piston/emitters.py:
    # instead of the original simplejson import
    import json as simplejson

    # instead of the DateTimeAwareJsonEncoder import
    from django.core.serializers.json import DjangoJSONEncoder as DateTimeAwareJSONEncoder

    # in ~186 replace the following line
    for f in data._meta.fields + data._meta.virtual_fields])
    # with this line
    for f in data._meta.fields + tuple(data._meta.virtual_fields)])

In piston/resource.py
    # in ~207 replace
    resp = HttpResponse(stream, mimetype=ct, status=status_code)
    # with this line
    resp = HttpResponse(stream, content_type=ct, status=status_code)