diff --git a/.gitignore b/.gitignore index 543b3a9..4f7f00f 100644 --- a/.gitignore +++ b/.gitignore @@ -206,4 +206,7 @@ target/ __pycache__/ local_settings.py eng_env/ -.env \ No newline at end of file +.env + +## Custom Files +mobile_app/* \ No newline at end of file diff --git a/server/main/english_learn/select_learn/api/views.py b/server/main/english_learn/select_learn/api/views.py index 1e24d0f..ebd7d70 100644 --- a/server/main/english_learn/select_learn/api/views.py +++ b/server/main/english_learn/select_learn/api/views.py @@ -36,7 +36,8 @@ def get(self, request): user_id = request.user.id sql_str = f"""select * from public.select_learn_userword where ('2.72'::real ^ -((SELECT EXTRACT(epoch FROM (now() - updated_at::timestamptz)))/3600::real / strength)) < 0.5 - and user_id = {user_id} or trials = 0 and user_id = {user_id} limit 20;""" + and user_id = {user_id} or + trials = 0 and user_id = {user_id} limit 20;""" words = UserWord.objects.raw(sql_str) # print(words) words = UserWordSerializer(words, many=True).data