You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromrest_framework.viewsimportAPIViewfromrest_framework.responsesimportResponsefromprofile.modelsimportProfileSettingsfromprofile.serializersimportProfileSerializerclassProfileView(APIView):
defget(self, request):
foodie_partner=request.GET.get('foodie_partner', None)
location_range=request.GET.get('location_range', None)
min_age=request.GET.get('min_age', None)
max_age=request.GET.get('max_age', None)
# Here I am using 1 level query# Use others # REMEMBER: min_age and max_age is integer, so use greater/less/equal# Ref: https://stackoverflow.com/questions/10040143/#10040165query=ProfileSettings.objects.filter(foodie_partner__iexact=foodie_partner).only()
serializer=ProfileSerializer(query, many=True)
returnResponse(serializer.data)
The text was updated successfully, but these errors were encountered:
MeetForFood/meetforfood/profiles/views.py
Line 98 in b7b5a1a
The text was updated successfully, but these errors were encountered: