Commit c90c227d 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 adega/adega!18
parents 5ccb5b67 3816d8e2
import os
import time import time
from script.base.dataframe_base import load_dataframes from script.base.dataframe_base import load_dataframes
from script.build_cache import build_cache from script.build_cache import build_cache
...@@ -24,16 +24,7 @@ def analyze(submission): ...@@ -24,16 +24,7 @@ def analyze(submission):
def main(): def main():
start_time = time.clock() print("Não pra você estar fazendo isso")
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))
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -9,8 +9,8 @@ from uploads.models import Submission ...@@ -9,8 +9,8 @@ from uploads.models import Submission
def upload(request): def upload(request):
if request.method == 'POST' and request.FILES['historico'] and request.FILES['matricula']: if request.method == 'POST' and request.FILES['historico'] and request.FILES['matricula']:
submission = Submission.objects.create(author=request.user) submission = Submission.objects.create(author=request.user,
submission.degree = request.user.educator.degree degree=request.user.educator.degree.first())
fs = FileSystemStorage(location=submission.path()) 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