Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProjectClient_Y1S1_tramshedTech_team15
Manage
Activity
Members
Labels
Plan
Issues
7
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arianne Bayliss
ProjectClient_Y1S1_tramshedTech_team15
Commits
9b480c90
Commit
9b480c90
authored
2 years ago
by
Arianne Bayliss
Browse files
Options
Downloads
Patches
Plain Diff
deleting test server
parent
964a02c5
Branches
2-as-a-user-i-want-to-be-authorized-if-i-am-a-member
Branches containing commit
No related tags found
1 merge request
!61
deleting test server
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testloginserver.py
+0
-50
0 additions, 50 deletions
testloginserver.py
with
0 additions
and
50 deletions
testloginserver.py
deleted
100644 → 0
+
0
−
50
View file @
964a02c5
import
os
import
sqlite3
from
flask
import
Flask
,
request
,
render_template
,
send_from_directory
app
=
Flask
(
__name__
)
ALLOWED_EXTENSIONS
=
set
([
'
txt
'
,
'
pdf
'
,
'
png
'
,
'
jpg
'
,
'
jpeg
'
,
'
gif
'
])
@app.route
(
"
/home
"
,
methods
=
[
"
GET
"
])
def
load
():
return
render_template
(
'
landingpage.html
'
)
@app.route
(
"
/locations
"
,
methods
=
[
"
GET
"
])
def
loadlocations
():
return
send_from_directory
(
'
static
'
,
'
locations.html
'
)
@app.route
(
"
/coworking
"
,
methods
=
[
"
GET
"
])
def
loadcoworking
():
return
render_template
(
'
manage_coworking_spaces.html
'
)
@app.route
(
"
/login
"
,
methods
=
[
"
GET
"
])
def
loadlogin
():
return
render_template
(
'
login.html
'
)
@app.route
(
"
/signin
"
,
methods
=
[
'
GET
'
,
'
POST
'
])
def
login
():
error
=
None
if
(
request
.
method
==
'
POST
'
):
recordEmail
=
request
.
form
.
get
(
'
recordEmail
'
)
print
(
recordEmail
)
recordPassword
=
request
.
form
.
get
(
'
recordPassword
'
)
print
(
recordPassword
)
try
:
conn
=
sqlite3
.
connect
(
"
login.db
"
)
cur
=
conn
.
cursor
()
cur
.
execute
(
"
INSERT INTO login (
'
Email
'
,
'
Password
'
) values (?,?)
"
,
(
recordEmail
,
recordPassword
))
conn
.
commit
()
recordData
=
cur
.
fetchall
()
print
(
recordData
)
return
recordData
except
Exception
as
e
:
recordData
=
e
print
(
f
"
Error:
{
e
}
"
)
conn
.
close
()
finally
:
conn
.
close
()
return
render_template
(
'
locations.html
'
)
if
__name__
==
"
__main__
"
:
app
.
run
(
debug
=
True
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment