-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* basic login/ register * sessions working * cookie expiry added * removed http.cookie import * removed checkLogin() handler (used for debugging) * Apply suggestions from code review Co-Authored-By: Arjoonn Sharma <[email protected]> * message display * bug fixes * changed name for decorator function * Apply suggestions from code review Co-Authored-By: Arjoonn Sharma <[email protected]> * authentication added to more handlers
- Loading branch information
1 parent
f5146b0
commit e3debe1
Showing
6 changed files
with
146 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,4 +69,5 @@ venv/ | |
|
||
.pytest_cache | ||
submission_record.db | ||
|
||
user_record.db | ||
session_record.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
% include('base.html', title="PyJudge") | ||
<body> | ||
<div class="container text-center"> | ||
<h1> | ||
PyJudge | ||
</h1> | ||
</div> | ||
% if message: | ||
<div class="alert alert-success alert-dismissible" style='width:auto;'> | ||
<button type="button" class="close" data-dismiss="alert">×</button> | ||
<strong>Error!</strong> {{message}} | ||
</div> | ||
% end | ||
<div class="container"> | ||
<ul class="nav nav-tabs"> | ||
<li class="nav-item"> | ||
<a class="nav-link active" data-toggle="tab" href="#login">Login</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" data-toggle="tab" href="#register">Register</a> | ||
</li> | ||
</ul> | ||
<div class="tab-content"> | ||
<div id="login" class="tab-pane container active"> | ||
<form name="login" method="post" action="/login"> | ||
<label>Username:</label> | ||
<input type="text" name="username" required /><br /> | ||
<label>Password</label> | ||
<input type="password" name="password" required /><br /> | ||
<input class="btn btn-primary" type="submit" value="Login" /> | ||
</form> | ||
</div> | ||
<div id="register" class="tab-pane container fade"> | ||
<form name="register" method="post" action="/register"> | ||
<label>Username:</label> | ||
<input type="text" name="username" required /><br /> | ||
<label>Password:</label> | ||
<input type="password" name="password" required /><br /> | ||
<input class="btn btn-primary" type="submit" value="Register" /> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters