Commit e8241065 authored by Odair M.'s avatar Odair M.

Closes adega#174: resolve o problema de acessar páginas públicas, modifica o...

Closes adega#174: resolve o problema de acessar páginas públicas, modifica o texto da tela de login e retira o ^adega/ dos módulos degree, course, student, submission e admission, matendo apenas  em admin
parent b1bb282b
......@@ -7,23 +7,23 @@ from . import views
from django.views.generic import RedirectView
urlpatterns = [
url(r'^$', RedirectView.as_view(url='/adega/')),
#url(r'^$', RedirectView.as_view(url='/')),
url(r'^adega/$', views.dashboard, name='dashboard'),
url(r'^$', views.dashboard, name='dashboard'),
url(r'^adega/admission/(?P<submission_id>\w*)/', include('admission.urls', namespace='admission')),
url(r'^admission/(?P<submission_id>\w*)/', include('admission.urls', namespace='admission')),
url(r'^adega/course/(?P<submission_id>\w*)/', include('course.urls', namespace='course')),
url(r'^course/(?P<submission_id>\w*)/', include('course.urls', namespace='course')),
url(r'^adega/submission/', include('submission.urls', namespace='submission')),
url(r'^submission/', include('submission.urls', namespace='submission')),
url(r'^adega/student/(?P<submission_id>\w*)/', include('student.urls', namespace='student')),
url(r'^student/(?P<submission_id>\w*)/', include('student.urls', namespace='student')),
url(r'^adega/degree/(?P<submission_id>\w*)/', include('degree.urls', namespace='degree')),
url(r'^degree/(?P<submission_id>\w*)/', include('degree.urls', namespace='degree')),
url(r'^adega/public/', include('public.urls', namespace='public')),
url(r'^public/', include('public.urls', namespace='public')),
url(r'^adega/logout/$', views.logout, name='logout'),
url(r'^logout/$', views.logout, name='logout'),
url(r'^adega/admin/', admin.site.urls),
]
......@@ -15,8 +15,6 @@ def detail(request, submission_id, ano, semestre):
submission = Submission.objects.get(id=submission_id)
degree = submission.degree
if not (degree in request.user.educator.degree.all()):
return redirect("adega:dashboard")
for admission in get_list_admission(request.session, degree, submission_id):
......@@ -51,8 +49,6 @@ def index(request, submission_id):
submission = Submission.objects.get(id=submission_id)
degree = submission.degree
if not (degree in request.user.educator.degree.all()):
return redirect("adega:dashboard")
return render(request, 'admission/index.html', {
"listage_admissions": get_list_admission(
......
......@@ -14,8 +14,6 @@ def detail(request, submission_id, codigo_disciplina):
submission_id = int(submission_id)
submission = Submission.objects.get(id=submission_id)
degree = submission.degree
if not (degree in request.user.educator.degree.all()):
return redirect("adega:dashboard")
course_detail = get_course_detail(
request.session,
......@@ -39,8 +37,6 @@ def index(request, submission_id):
submission = Submission.objects.get(id=submission_id)
degree = submission.degree
if not (degree in request.user.educator.degree.all()):
return redirect("adega:dashboard")
analysis_result = get_list_courses(request.session, degree, submission_id)
courses_list = analysis_result["cache"]
......
......@@ -17,13 +17,10 @@ def index(request, submission_id):
degree = submission.degree
if not (degree in request.user.educator.degree.all()):
return redirect("dashboard")
degree_data = get_degree_information(request.session,degree, submission_id=submission_id)
return render(request,"degree/index.html",{
"submission":submission,
degree_data = get_degree_information(request.session, degree, submission_id=submission_id)
return render(request, "degree/index.html", {
"submission": submission,
"degree": degree,
"degree_data":degree_data
"degree_data": degree_data
})
......@@ -6,15 +6,11 @@
<section class="col-md-8 content">
<h2>O projeto adega</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Integer auctor pellentesque lacus eget tincidunt.
Nam eu blandit est, sed vestibulum arcu. Phasellus ut tempus sapien.
Nunc vitae justo quis elit mattis ullamcorper eu ut lorem.
Sed ut interdum enim. Maecenas orci lectus, euismod sed
gravida fermentum, pretium non dui. Mauris vehicula nisl in
suscipit lacinia.</p>
<p>
O A.D.E.G.A. (Análise de Dados Estatísticos da Grade Acadêmica) tem como objetivo de desenvolver estudos sobre os cursos de graduacão por meio de técnicas de análise de dados como forma de obter informações sobre os cursos de graduação.
</p>
<p>Sed a risus eu sapien dictum faucibus a sed massa.
<!-- <p>Sed a risus eu sapien dictum faucibus a sed massa.
Curabitur non sapien non ipsum tincidunt sodales sed eu libero.
Vestibulum ac libero laoreet, fermentum dui id, maximus ex.
Ut sit amet turpis nulla. Sed ac sapien tortor.
......@@ -27,7 +23,7 @@
mattis venenatis. Pellentesque sed ligula commodo augue lobortis
accumsan ac tempor velit. Duis pharetra mattis orci, commodo
bibendum ex luctus at. Nullam nisl est, mattis id augue dignissim,
varius maximus quam.</p>
varius maximus quam.</p> -->
</section>
<section id="content" class="col-md-4 content">
......
......@@ -17,8 +17,6 @@ def detail(request, submission_id, grr):
submission = Submission.objects.get(id=submission_id)
degree = submission.degree
if not (degree in request.user.educator.degree.all()):
return redirect("adega:dashboard")
cache_j = get_student_detail(
request.session,
......@@ -54,8 +52,6 @@ def index(request, submission_id):
submission = Submission.objects.get(id=submission_id)
degree = submission.degree
if not (degree in request.user.educator.degree.all()):
return redirect("adega:dashboard")
sem_evasao = get_list_students(
......
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