@krstnschwpwr are you using any additional frameworks? like django-rust?
no its just simple django 1.10
if not and you are just in an usual django handler/view, you can just check for the parameter (like if request.GET.get("format") == "prtg") and render it differently
yeah i have something like this already def prtg_json(request): if 'format' in request.GET and request.GET['format'] == 'prtg': queryset = Speed.objects.latest() serializer = SpeedPrtgSerializer(queryset, many=False) return Response(serializer.data) …trying to use a different serializer for this
(you might want to use a pastebin or gist to ensure formatting stays in tact)
and that doesn't work?
(because working with a serialiser was the other thing I wanted to recommend)
@krstnschwpwr I think in the last line it might have to be return Response(serializer.get_value())
but I am just quoting from the docs here, not used serialisers myself.
I am new here and probably the first non German guy
I am front end web developer but have recently started with python to learn Django
So is codecademy a good start?
I already know HTML CSS JS C/C++
@MisterRios I guess you can help me out with the initial phase in Python parking