Add profile view , updating password, email, source repo

This commit is contained in:
AndyGrant committed 2018-06-10 23:19:15 -04:00
1 parent e77a6509fb
commit 64f492a345
8 files changed
+75 -18

No files matched your search

+6 -1
View File
@@ -1,4 +1,4 @@
from OpenBench.models import Engine, Test
from OpenBench.models import Engine, Profile, Machine, Test
import math, requests
@@ -70,6 +70,11 @@ def newTest(request):
basesha, basesource = getSourceLocation(basename, request.POST['source'])
test.base = newEngine(basename, basesource, baseprotocol, basesha, basebench)
# Track # of tests by this user
profile = Profile.objects.get(user=request.user)
profile.tests += 1
profile.save()
# Nothing seems to have gone wrong
test.save()
return test