agregado cache a get_artist_of_disc

This commit is contained in:
Daniel Cortes
2020-06-09 05:55:48 -04:00
parent d6060915de
commit d62253051b
3 changed files with 26 additions and 19 deletions

View File

@@ -69,15 +69,9 @@ def get_discs_of_artist(request, mbid):
@api_view(['GET'])
def get_artist_of_disc(request, mbid):
""" Obtiene el artista de un disco
""" Obtiene el artista de un disco"""
Como los datos son paginables la query puede contener per_page y page para definir cuantos
elementos mostrar por pagina y que pagina mostrar.
"""
limit = int(request.GET.get('per_page', 10))
page = int(request.GET.get('page', 1))
return Response(medium.get_artist_of_disc(mbid, limit, page))
return Response(medium.get_artist_of_disc(mbid))
@api_view(['GET'])