Layout fix

This commit is contained in:
Piotr Kopycki 2022-01-25 18:45:02 +01:00
parent 0c950624bf
commit 9796b5800c
6 changed files with 14 additions and 24 deletions

View File

@ -54,13 +54,13 @@
border: 2px solid #FF0B7E;
padding: 20px;
width: 800px;
height: 225px;
height: 150px;
}
.mainTestName {
font-weight: bold;
font-size: 20px;
padding-bottom: 20px;
padding-bottom: 25px;
}
.solvedTestContainer {
@ -78,7 +78,7 @@
.mainTestMeta {
font-size: 13px;
padding-bottom: 15px;
padding-bottom: 40px;
color: #808080;
/*transform: translate(150%,0%);*/
width:100%;

View File

@ -14,10 +14,9 @@
<div class="center">Próg zaliczenia: {{test.passing_score}}</div>
<div class="right">Ilość pytań: {{test.questions|length}}</div>
</div>
<div class="mainTestDesc">
<!-- TODO 250 words limit-->
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus volutpat scelerisque tortor, id sodales leo finibus id. Vivamus id viverra nunc, ac faucibus metus. Nulla a mauris imperdiet sapien lobortis dapibus. Quisque ornare posuere pulvinar.
</div>
<!-- <div class="mainTestDesc">-->
<!-- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus volutpat scelerisque tortor, id sodales leo finibus id. Vivamus id viverra nunc, ac faucibus metus. Nulla a mauris imperdiet sapien lobortis dapibus. Quisque ornare posuere pulvinar.-->
<!-- </div>-->
<button><a href="/tests/{{test.id}}/show">Rozwiąż</a></button>
</div>
<br>

View File

@ -1,4 +0,0 @@
Usunąłeś test!
<a href="/home">Home</a>

View File

@ -14,10 +14,9 @@
<div class="center">Próg zaliczenia: {{test.passing_score}}</div>
<div class="right">Ilość pytań: {{test.questions|length}}</div>
</div>
<div class="mainTestDesc">
<!-- TODO 250 words limit-->
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus volutpat scelerisque tortor, id sodales leo finibus id. Vivamus id viverra nunc, ac faucibus metus. Nulla a mauris imperdiet sapien lobortis dapibus. Quisque ornare posuere pulvinar.
</div>
<!-- <div class="mainTestDesc">-->
<!-- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus volutpat scelerisque tortor, id sodales leo finibus id. Vivamus id viverra nunc, ac faucibus metus. Nulla a mauris imperdiet sapien lobortis dapibus. Quisque ornare posuere pulvinar.-->
<!-- </div>-->
<button><a href="/tests/{{test.id}}/show">Rozwiąż</a></button>
</div>
<br>

View File

@ -14,10 +14,9 @@
<div class="center">Próg zaliczenia: {{test.passing_score}}</div>
<div class="right">Ilość pytań: {{test.questions|length}}</div>
</div>
<div class="mainTestDesc">
<!-- TODO 250 words limit-->
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus volutpat scelerisque tortor, id sodales leo finibus id. Vivamus id viverra nunc, ac faucibus metus. Nulla a mauris imperdiet sapien lobortis dapibus. Quisque ornare posuere pulvinar.
</div>
<!-- <div class="mainTestDesc">-->
<!-- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus volutpat scelerisque tortor, id sodales leo finibus id. Vivamus id viverra nunc, ac faucibus metus. Nulla a mauris imperdiet sapien lobortis dapibus. Quisque ornare posuere pulvinar.-->
<!-- </div>-->
<div class="tripleButton">
<button><a href="/tests/{{test.id}}/show">Rozwiąż</a></button>
<button><a href="/tests/{{test.id}}/edit">Edytuj</a></button>

View File

@ -20,8 +20,6 @@ import requests
def addTest(request):
if request.POST:
return redirect('home')
return render(request, 'createTest.html')
@ -71,6 +69,7 @@ def addQuestions(request, **kwargs):
]
})
Test.objects.create(name=name, passing_score=passing, category=category, questions=questions, user=user)
return redirect('home')
return render(request, 'addQuestions.html')
@ -163,9 +162,7 @@ class EditTestTemplateView(TemplateView):
def deleteTest(request, test_id):
Test.objects.filter(id=test_id).delete()
return render(request, 'deletedTest.html')
return redirect('myTests')
class TestModelViewSet(viewsets.ModelViewSet):