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
e1f7d613
Commit
e1f7d613
authored
2 years ago
by
Arianne Bayliss
Browse files
Options
Downloads
Patches
Plain Diff
adding test server
parent
b7719b19
No related branches found
No related tags found
1 merge request
!42
Pulled from development/pushed test server code
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
static/landingpage.html
+1
-1
1 addition, 1 deletion
static/landingpage.html
static/login.html
+2
-2
2 additions, 2 deletions
static/login.html
testloginserver.py
+46
-0
46 additions, 0 deletions
testloginserver.py
with
49 additions
and
3 deletions
static/landingpage.html
+
1
−
1
View file @
e1f7d613
...
...
@@ -31,7 +31,7 @@
<link
rel=
"preconnect"
href=
"https://fonts.googleapis.com"
>
<link
rel=
"preconnect"
href=
"https://fonts.gstatic.com"
crossorigin
>
<link
href=
"https://fonts.googleapis.com/css2?family=Sora:wght@800&display=swap"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
href=
"landingstyle.css"
>
<link
rel=
"stylesheet"
href=
"
CSS/
landingstyle.css"
>
<title>
Tramshed Tech
</title>
<img
id=
"tramshed"
src=
"Media/tramshed.jpg"
>
<div
class=
"bg-dark p-3"
>
...
...
This diff is collapsed.
Click to expand it.
static/login.html
+
2
−
2
View file @
e1f7d613
...
...
@@ -25,13 +25,13 @@
<form>
<!-- Email input -->
<div
class=
"form-outline mb-4"
>
<input
type=
"email"
id=
"
form2Example1
"
class=
"form-control"
/>
<input
type=
"email"
id=
"
recordEmail
"
class=
"form-control"
/>
<label
class=
"form-label"
for=
"form2Example1"
>
Email address
</label>
</div>
<!-- Password input -->
<div
class=
"form-outline mb-4"
>
<input
type=
"password"
id=
"
form2Example2
"
class=
"form-control"
/>
<input
type=
"password"
id=
"
recordPassword
"
class=
"form-control"
/>
<label
class=
"form-label"
for=
"form2Example2"
>
Password
</label>
</div>
...
...
This diff is collapsed.
Click to expand it.
testloginserver.py
0 → 100644
+
46
−
0
View file @
e1f7d613
import
os
import
sqlite3
from
flask
import
Flask
,
redirect
,
request
,
render_template
,
jsonify
app
=
Flask
(
__name__
)
DATABASE
=
"
login.db
"
ALLOWED_EXTENSIONS
=
set
([
'
txt
'
,
'
pdf
'
,
'
png
'
,
'
jpg
'
,
'
jpeg
'
,
'
gif
'
])
@app.route
(
"
/SearchRecord
"
,
methods
=
[
'
POST
'
])
def
searchRecord
():
if
request
.
method
==
'
POST
'
:
try
:
recordEmail
=
request
.
form
.
get
(
'
recordEmail
'
,
default
=
"
Error
"
)
conn
=
sqlite3
.
connect
(
DATABASE
)
cur
=
conn
.
cursor
()
cur
.
execute
(
"
SELECT * FROM login WHERE Email=?;
"
,
[
recordEmail
])
recordData
=
cur
.
fetchall
()
except
:
print
(
f
"
Error:
{
recordData
}
"
)
conn
.
close
()
finally
:
conn
.
close
()
print
(
f
"
{
str
(
recordData
)
}
Record found.
"
)
return
str
(
recordData
)
@app.route
(
"
/AddRecord
"
,
methods
=
[
'
POST
'
])
def
addRecord
():
if
(
request
.
method
==
'
POST
'
):
recordEmail
=
request
.
form
[
'
recordEmail
'
]
recordPassword
=
request
.
form
[
'
recordPassword
'
]
conn
=
sqlite3
.
connect
(
DATABASE
)
cur
=
conn
.
cursor
()
cur
.
execute
(
"
INSERT INTO login (
'
Email
'
,
'
Password
'
)
\
VALUES (?,?)
"
,
(
recordEmail
,
recordPassword
))
conn
.
commit
()
conn
.
close
()
infoMessage
=
(
f
'
{
recordData
}
Record added.
'
)
print
(
infoMessage
)
return
(
infoMessage
)
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