Commit a10372c1 authored by Bruno Meyer's avatar Bruno Meyer 😢
Browse files

Merge branch 'fix-upload' into 'master'

fix upload e elimina o main

See merge request !18
parents 123d5d8d 46d03adb
Pipeline #15864 failed with stage
in 1 minute and 57 seconds
import os
import time
from script.base.dataframe_base import load_dataframes
from script.build_cache import build_cache
......@@ -24,16 +24,7 @@ def analyze(submission):
def main():
start_time = time.clock()
start_time_exec = time.time()
dataframe = load_dataframes(os.getcwd() + '/script/' + 'base/21A/1/')
build_cache(dataframe)
cpu_time = timedelta(seconds=round(time.clock() - start_time))
run_time = timedelta(seconds=round(time.time() - start_time_exec))
print("--- Tempo de CPU: {} ---".format(cpu_time))
print("--- Tempo total: {} ---".format(run_time))
print("Não pra você estar fazendo isso")
if __name__ == "__main__":
......
......@@ -9,8 +9,8 @@ from uploads.models import Submission
def upload(request):
if request.method == 'POST' and request.FILES['historico'] and request.FILES['matricula']:
submission = Submission.objects.create(author=request.user)
submission.degree = request.user.educator.degree
submission = Submission.objects.create(author=request.user,
degree=request.user.educator.degree.first())
fs = FileSystemStorage(location=submission.path())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment