Created
July 26, 2018 00:04
-
-
Save fhdez/7b431642fe165d2274d98cc7508db6e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@list_route(methods=['GET']) | |
def clic_studentcalendar(self, request, *args, **kwargs): | |
""" | |
Record activity for clic a child calendar | |
--- | |
omit_serializer: true | |
responseMessages: | |
- code: 201 | |
message: CREATED | |
- code: 400 | |
message: BAD REQUEST | |
- code: 403 | |
message: FORBIDDEN | |
- code: 500 | |
message: INTERNAL SERVER ERROR | |
consumes: | |
- application/json | |
produces: | |
- application/json | |
""" | |
# | |
# Record a clic on calendar child | |
# | |
child = User.objects.get(pk=) #obtener el id del niño a tra ves de la API_URL | |
#GET /api/v1/me/children/{child_pk}/calendars | |
origin_queryparam = request.query_params.get('origin', 'app') | |
action_create = models.Action.objects.created_action(origin_queryparam) | |
action.send( | |
request.user, | |
verb=settings.CUSTOM_ACTIONS['clic_calendar'], | |
description=u'Visitó Calendario de {}'.format( | |
child.full_name | |
), | |
action_object=action_create | |
) | |
return Response(status=status.HTTP_201_CREATED) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment