-
함수 실행(공부여부)토이2(프로젝트) 2023. 6. 5. 23:53@login_requireddef index(request):#경과시간print(0)user = request.useruser.is_running=0#기본 값으로 변경user.save()return render(request, "stopwatch/index.html")
@login_requireddef stop(request):print(1)user = request.useruser.is_running=1#기본 값으로 변경user.save()stopwatch/ 에서 시작버튼 클릭(stopwatch/stop/이동) 하면 유저 is_running(기본값0)에 1저장
stopwatch/stop에서 저장 버튼 클릭(stopwatch/이동)하면 기본 값0으로 저장 그래서 실행여부 확인
'토이2(프로젝트)' 카테고리의 다른 글
오늘 누적시간(합)해당유저 시간 (0) 2023.06.08 db(test)에 유저정보(id) 추가/db 생성 시간 추가 (0) 2023.06.02 시간(값) 기록 알림 (0) 2023.05.26