def get_reminder(request): id = request.POST.get('id', None) done = request.POST.get('done', None) query_id = request.POST.get('query_id', None) page = request.POST.get('page', 1) alerts = geoalert.get_alert(request, id, done, page, query_id) return HttpResponse(getAlertsJSON(alerts), mimetype="application/json")
def get_suggestion_following(request): query_id = request.POST.get('query_id', None) page = int(request.POST.get('page', 1)) suggestions = geoalert.get_suggestion_following(request, page=page, query_id=query_id) from funcs import getAlertsJSON return HttpResponse(getAlertsJSON(suggestions), mimetype="application/json")
def get_reminder(request): """ Obtiene los eventos Parametros en POST: eventid: el id del evento a buscar done: si solo se quieren los eventos realizados (opcional) page : pagina a mostrar query_id: id de la consulta de pagina """ eventid = request.POST.get('eventid', None) done = request.POST.get('done', None) query_id = request.POST.get('query_id', None) page = request.POST.get('page', 1) alerts = geoalert.get_alert(request, eventid, done, page, query_id) from funcs import getAlertsJSON return HttpResponse(getAlertsJSON(alerts), mimetype="application/json")
def get_suggestion(request): """ Obtiene los eventos Parametros en POST: eventid: el id del evento a buscar (opcional) wanted_user: usuario a buscar (opcional, por defecto, es uno mismo) private_profile: busqueda para mostrar en el perfil privado del usuario query_id: id de la consulta de pagina page : pagina a mostrar """ eventid = request.POST.get('eventid', None) wanted_user = request.POST.get('wanteduser', request.user) if eventid is None: from geoalert.api import get_suggestions_dict suggestions = get_suggestions_dict(wanted_user) # FIXME: devolver solo publicas else: suggestions = geoalert.get_suggestion(request, id=eventid, wanted_user=wanted_user) from funcs import getAlertsJSON return HttpResponse(getAlertsJSON(suggestions), mimetype="application/json")
def get_suggestion(request): """ Obtiene los eventos Parametros en POST: eventid: el id del evento a buscar (opcional) wanted_user: usuario a buscar (opcional, por defecto, es uno mismo) private_profile: busqueda para mostrar en el perfil privado del usuario query_id: id de la consulta de pagina page : pagina a mostrar """ eventid = request.POST.get('eventid', None) wanted_user = request.POST.get('wanteduser', request.user) if eventid is None: from geoalert.api import get_suggestions_dict suggestions = get_suggestions_dict( wanted_user) # FIXME: devolver solo publicas else: suggestions = geoalert.get_suggestion(request, id=eventid, wanted_user=wanted_user) from funcs import getAlertsJSON return HttpResponse(getAlertsJSON(suggestions), mimetype="application/json")