adjust account fields, cache the website_config

This commit is contained in:
zema1
2017-09-22 16:41:29 +08:00
parent 034ad59f2e
commit e9c7344815
9 changed files with 90 additions and 11 deletions

View File

@@ -43,9 +43,9 @@ class ProblemAPI(APIView):
problems = problems.filter(Q(title__contains=keyword) | Q(description__contains=keyword))
# 难度筛选
difficulty_rank = request.GET.get("difficulty")
if difficulty_rank:
problems = problems.filter(difficulty=difficulty_rank)
difficulty = request.GET.get("difficulty")
if difficulty:
problems = problems.filter(difficulty=difficulty)
# 根据profile 为做过的题目添加标记
data = self.paginate_data(request, problems, ProblemSerializer)
if request.user.id: