class FilterMealList(views.APIView):
def get(self, request, **kwargs):
user_id = self.kwargs['user_id']
from_time = self.request.GET.get('from_time')
to_time = self.request.GET.get('to_time')
from_date = self.request.GET.get('from_date')
to_date = self.request.GET.get('to_date')
# …
request.GET.get('q', None).
#In views.py file:
def get_param(request, param):
my_parameter = param
#In urls.py
path('test/<param>', views.get_param, name='get_param'),
#Then ypu can access with the url: http://localhost:8000/test/test_param