Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Python kepzes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pál Boldizsár
Python kepzes
Commits
5d7c64db
Commit
5d7c64db
authored
Apr 2, 2020
by
Pál Boldizsár
Browse files
Options
Downloads
Patches
Plain Diff
Dammboi harmadik feladat vege
parent
76824bd0
Branches
2_feladat
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
DB/Database.py
+4
-0
4 additions, 0 deletions
DB/Database.py
with
4 additions
and
0 deletions
DB/Database.py
+
4
−
0
View file @
5d7c64db
...
@@ -2,8 +2,11 @@
...
@@ -2,8 +2,11 @@
ez file lenne ami ossyekoti a db-t a programunkal. hogy egyszerubb legyen
ez file lenne ami ossyekoti a db-t a programunkal. hogy egyszerubb legyen
az eletunk, ezert most csak egyszeru dictekbe, meg setekbe tarolunk mindent
az eletunk, ezert most csak egyszeru dictekbe, meg setekbe tarolunk mindent
"""
"""
import
pprint
fake_db
=
{}
fake_db
=
{}
fake_db
[
'
u_names
'
]
=
set
()
fake_db
[
'
users
'
]
=
[]
def
check_user_name
(
username
=
None
):
def
check_user_name
(
username
=
None
):
...
@@ -36,4 +39,5 @@ def create_user(username, password):
...
@@ -36,4 +39,5 @@ def create_user(username, password):
fake_db
[
'
users
'
].
append
({
'
Username
'
:
username
,
'
Password
'
:
password
})
fake_db
[
'
users
'
].
append
({
'
Username
'
:
username
,
'
Password
'
:
password
})
except
Exception
as
e
:
except
Exception
as
e
:
return
'
oopsie
'
,
e
return
'
oopsie
'
,
e
pprint
.
pprint
(
fake_db
)
return
True
return
True
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