generated from nyu-software-engineering/web-app-exercise
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca6fd11
commit 006da2c
Showing
4 changed files
with
38 additions
and
17 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 |
---|---|---|
|
@@ -7,6 +7,7 @@ name = "pypi" | |
pymongo = "*" | ||
flask = "*" | ||
python-dotenv = "*" | ||
flask-login = "*" | ||
|
||
[dev-packages] | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,15 +1,29 @@ | ||
from flask import render_template, request, redirect, url_for | ||
# from flask_login import LoginManager | ||
from flask import render_template, request, redirect, url_for, session | ||
from flask_login import LoginManager | ||
import app | ||
|
||
# login_manager = LoginManager() | ||
|
||
def login(): | ||
login_manager = LoginManager() | ||
|
||
class User(): | ||
def __init__(self, is_authenticated, is_active, is_anonymous): | ||
self.is_authenticated = is_authenticated | ||
self.is_active = is_active | ||
self.is_anonymous = is_anonymous | ||
|
||
|
||
def login(db): | ||
print(db) | ||
if request.method == 'POST': | ||
## TODO: Login | ||
return "Someone pressed the login button huh, I better log you in." | ||
else: | ||
return render_template('login.html') | ||
|
||
def signup(): | ||
return render_template('signup.html') | ||
def signup(db): | ||
if request.method == 'POST': | ||
username = request.form["username"] | ||
password = request.form["password"] | ||
else: | ||
return render_template('signup.html') | ||
|