Possibly the final commit

This commit is contained in:
Praneeth Bhandaru 2020-12-13 14:18:32 -05:00
parent d8d1474e09
commit 43b0a67d15
5 changed files with 18 additions and 12 deletions

View File

@ -9,6 +9,8 @@ from .forms import *
# Create your views here.
def register_view(request):
if request.user or request.user.is_authenticated:
return redirect('home')
if request.method == "POST":
form = UserRegisterForm(request.POST)
if form.is_valid():
@ -67,7 +69,7 @@ def classroom_view(request, id):
return HttpResponseForbidden('You do not have access to this class')
return render(request, "frontend/class.html", {'class': classroom})
@login_required
def classroom_edit_view(request, id):
classroom = Classroom.objects.get(id=id)
if classroom.student.user.pk != request.user.pk:
@ -86,7 +88,8 @@ def classroom_edit_view(request, id):
return render(request, 'frontend/editClassroom.html', {'form': form})
def landing_page(request):
if request.user or request.user.is_authenticated:
if request.user.is_authenticated:
return redirect('home')
return render(request, 'frontend/landing.html')

View File

@ -43,19 +43,19 @@
<div class="navbar-brand">
<span class="navbar-caption-wrap"><a class="navbar-caption text-white display-4"
href="{% url 'home' %}" style="font-size: 25px !important;">
href="{% url 'landing_page' %}" style="font-size: 25px !important;">
DO NOT SPACE OUT</a></span>
</div>
</div>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav nav-dropdown " data-app-modern-menu="true">
{% if user.is_authenticated %}
<li class="nav-item">
<a class="nav-link link text-white display-4" style="font-size: 20px !important;" href="{% url 'classroom_form' %}" aria-expanded="false">
Classroom
</a>
</li>
{% if user.is_authenticated %}
<li class="nav-item dropdown">
<a class="nav-link link text-white dropdown-toggle display-4" style="font-size: 20px !important;" href="blog.html" data-toggle="dropdown-submenu" aria-expanded="false">
Profile

View File

@ -57,7 +57,7 @@
{% endblock %}
{% block content %}
<section class="showcase">
<section class="showcase">
<div class="video-container">
<video src="http://video2.ignitemotion.com/files/mp4/earthAnimation02.mp4" autoplay muted loop></video>
</div>
@ -73,9 +73,7 @@
<section id="about">
<h1>About</h1>
<p>
This is a landing page with a full screen video background. Feel free to
use this landing page in your projects. keep adding sections, change the
video, content , etc
Just imagine, your in a boring class, and start to doze off during a long lecture. You start day dreaming about getting back to school, when suddenly the teacher calls on you. You wouldn't want to embarrass yourself by saying you weren't listening, so instead you should take precautions. That's why we are here to help you!
</p>
</section>
{% endblock %}

View File

@ -6,8 +6,7 @@
{% block head %}
<link rel="stylesheet" type="text/css" href="{% static "login/css/index.css" %}"
/><!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="{% static "login/css/index.css" %}"/><!--===============================================================================================-->
<link rel="icon" type="image/png" href="{% static "login/images/icons/favicon.ico" %}"/>
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="{% static "login/vendor/bootstrap/css/bootstrap.min.css" %}">
@ -33,7 +32,8 @@
{% block content %}
<div class="login_container">
<div class="container-login100" style="background-image: url("{% static 'login/images/bg-01.jpg' %}");">
<div class="container-login100">
<br><br><br><br>
<div class="wrap-login100 p-l-55 p-r-55 p-t-80 p-b-30">
<form class="login100-form validate-form" method="POST">
{% csrf_token %}
@ -62,6 +62,7 @@
</div>
</div>
<div id="dropDownSelect1"></div>
</div>
{% endblock content %}
{% block js %}

View File

@ -19,7 +19,7 @@
A speech to text program to help transcribe your online meetings!</p>
<div class="mbr-section-btn py-4">
<a class="btn btn-md btn-white-outline display-4"
href="#">LEARN MORE</a>
href="#">DOWNLOAD DESKTOP PROGRAM</a>
</div>
<br>
</div>
@ -43,6 +43,7 @@
<div class="container classes center centered m-10">
<hr>
<div class="m-b-10"></div>
{% if classes %}
{% for user_class in classes %}
<br>
<br>
@ -53,6 +54,9 @@
<h3>Period: {{ user_class.period }}</h3>
</div>
{% endfor %}
{% else %}
Create a new class by pressing Classroom in the navbar!
{% endif %}
</div>
<br>