Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more validation #14

Open
francbartoli opened this issue Jan 6, 2018 · 0 comments
Open

add more validation #14

francbartoli opened this issue Jan 6, 2018 · 0 comments
Labels

Comments

@francbartoli
Copy link
Owner

francbartoli commented Jan 6, 2018

    # see https://richardtier.com/2014/03/24/json-schema-validation-with-django-rest-framework/
        serializer.save()
        return Response(serializer.data, status=status.HTTP_201_CREATED)
    return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)

opened via imdone.io from a code comment on 0ad77b9


gee-bridge/api/views.py

Lines 376 to 385 in 0ad77b9

# if serializer.is_valid(): # TODO add more validation id:8 gh:14
# # see https://richardtier.com/2014/03/24/json-schema-validation-with-django-rest-framework/
# serializer.save()
# return Response(serializer.data, status=status.HTTP_201_CREATED)
# return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
# @api_view(['GET', 'PUT', 'DELETE'])
# @renderer_classes([JSONRenderer,
# BrowsableAPIRenderer,

@francbartoli francbartoli changed the title add more validation add more validation Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant