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

Merge branch 'issue/157' into 'development'

Closes #157: renomeia uploads para submission e move pasta script para submission/analysis

Closes #157

See merge request !55
parents 0733528c d9984361
Pipeline #19213 passed with stage
in 14 seconds
......@@ -28,3 +28,94 @@ static/*
**/__pycache__
*.ipynb
# Created by https://www.gitignore.io
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml
# Translations
*.mo
*.pot
# Sphinx documentation
docs/_build/
# PyBuilder
target/
### Django ###
*.log
*.pot
*.pyc
__pycache__/
local_settings.py
.env
db.sqlite3
......@@ -60,7 +60,7 @@ Enquanto o `sudo make docker-up` estiver sendo executado, as alterações feitas
Assim como é possível realizar qualquer comando como seria feito no com o manage.py, também é possível por meio do comando `sudo make docker-manage`. Por exemplo:
```bash
$ sudo make docker-manage makemigrations uploads
$ sudo make docker-manage makemigrations submission
$ sudo make docker-manage migrate
$ sudo make docker-manage createsuperuser
```
......
......@@ -2,6 +2,6 @@
# If ANY of this commands fails (return != 0) the container will be down
bash ./docker_scripts/wait_for_postgres.sh
cd src
python manage.py makemigrations degree admission educator uploads course
python manage.py makemigrations degree admission educator submission course
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
......@@ -2,7 +2,7 @@
# If ANY of this commands fails (return != 0) the container will be down
bash ./docker_scripts/wait_for_postgres.sh
cd src
python manage.py makemigrations degree admission educator uploads course
python manage.py makemigrations degree admission educator submission course
python manage.py migrate
python manage.py collectstatic --noinput
......
from django.core.management.base import BaseCommand
from uploads.models import Submission
from submission.models import Submission
from script.main import analyze
from submission.analysis.main import analyze
class Command(BaseCommand):
......
......@@ -52,7 +52,7 @@ INSTALLED_APPS = [
'course',
'student',
'report_api',
'uploads'
'submission'
]
MIDDLEWARE_CLASSES = [
......@@ -170,7 +170,7 @@ else:
STATIC_ROOT = os.path.join(PROJECT_DIR, 'static')
MEDIA_URL = '/script/base/'
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'uploads')
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'submission')
# MEDIA_URL = None # a gente não quer ninguem fazendo download disso
# MEDIA_ROOT = os.path.join(PROJECT_DIR, 'uploads')
......@@ -10,8 +10,8 @@
submetidos e processados</b> referentes aos cursos registrados no sistema. Caso não exista nenhum
relatório processado relacionado aos cursos, o sistema acusará um erro.
<a href="{% url 'uploads:SubmissionCreateView' %}">Submeter relatório</a></a>,
que podem ser gerenciados na página <a href="{% url 'uploads:SubmissionListView' %}"> Gerenciar relatórios</a>.
<a href="{% url 'submission:SubmissionCreateView' %}">Submeter relatório</a></a>,
que podem ser gerenciados na página <a href="{% url 'submission:SubmissionListView' %}"> Gerenciar relatórios</a>.
<br><br>
......
......@@ -30,7 +30,7 @@
<a href="{% url 'dashboard' %}">Início</a>
</span>
<span class="navbar-text">
<a href="{% url 'uploads:SubmissionListView' %}">Relatórios</a>
<a href="{% url 'submission:SubmissionListView' %}">Relatórios</a>
</span>
&nbsp;&nbsp;&nbsp;
{% comment %}
......
<div class="sidebar left hidden-sm hidden-xs">
<li><a class="btn btn-primary text-left" href="{% url 'uploads:SubmissionListView' %}">Gerenciar relatórios</a></li>
<li><a class="btn btn-primary text-left" href="{% url 'submission:SubmissionListView' %}">Gerenciar relatórios</a></li>
<li><a class="btn btn-primary text-left" href="{% url 'degree:index' submission_id=submission.id%}">Informações gerais do curso</a></li>
<li><a class="btn btn-primary text-left" href="{% url 'student:index' submission_id=submission.id%}">Alunos</a></li>
<li style="display: block;">
......
......@@ -15,7 +15,7 @@ urlpatterns = [
url(r'^adega/course/(?P<submission_id>\w*)/', include('course.urls', namespace='course')),
url(r'^adega/submission/', include('uploads.urls', namespace='uploads')),
url(r'^adega/submission/', include('submission.urls', namespace='submission')),
url(r'^adega/student/(?P<submission_id>\w*)/', include('student.urls', namespace='student')),
......
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import logout as process_logout
from uploads.models import Submission
from submission.models import Submission
......@@ -19,9 +19,10 @@ def dashboard(request):
"code": degree.code,
"last_submission": last_submission
})
return render(request, 'adega/dashboard.html', {'title': 'Dashboard',
"degrees_last_submissions":degrees_last_submissions, "hide_navbar": True
})
return render(request, 'adega/dashboard.html', {"title": "Dashboard",
"degrees_last_submissions":degrees_last_submissions,
"hide_navbar": True
})
@login_required
......
......@@ -5,7 +5,7 @@ from django.contrib import messages
from degree.models import Degree
from report_api.views import get_list_admission, get_admission_detail
from uploads.models import Submission
from submission.models import Submission
def detail(request, submission_id, ano, semestre):
......
......@@ -5,7 +5,7 @@ from django.contrib import messages
from degree.models import Degree
from report_api.views import get_list_courses, get_course_detail
from uploads.models import Submission
from submission.models import Submission
def detail(request, submission_id, codigo_disciplina):
......
......@@ -2,5 +2,5 @@ from django.conf.urls import url
from degree import views
urlpatterns = [
url(r'^$',views.index, name='index')
url(r'^$', views.index, name='index')
]
......@@ -4,7 +4,7 @@ from django.contrib.auth.decorators import login_required
from django.contrib.auth import logout as process_logout
from report_api.views import get_degree_information
from degree.models import Degree
from uploads.models import Submission
from submission.models import Submission
import json
......
from degree.models import Degree
from uploads.models import Submission
from submission.models import Submission
import json
def get_data(session, degree, data_name, submission_id=None):
......
......@@ -8,7 +8,7 @@ from report_api.views import get_list_students, get_student_detail
import json
from uploads.models import Submission
from submission.models import Submission
def detail(request, submission_id, grr):
submission_id = int(submission_id)
......
from django.contrib import admin
from .models import Submission
from submission.models import Submission
from script.main import analyze
from submission.analysis.main import analyze
from traceback import print_exc
......
import numpy as np
from script.utils.situations import Situation as sit
from script.utils.situations import EvasionForm as ef
from script.utils.situations import *
from script.utils.situations import Situation as sit
from script.utils.situations import EvasionForm as ef
from script.analysis.student_analysis import StudentAnalysis
from submission.analysis.utils.situations import Situation as sit
from submission.analysis.utils.situations import EvasionForm as ef
from submission.analysis.utils.situations import *
from submission.analysis.utils.situations import Situation as sit
from submission.analysis.utils.situations import EvasionForm as ef
from submission.analysis.analysis.student_analysis import StudentAnalysis
from collections import defaultdict
import numpy as np
......
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