- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb_gui_impl.py
More file actions
Latest commit
84 lines (70 loc) · 1.92 KB
/
Copy pathdb_gui_impl.py
File metadata and controls
84 lines (70 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# -*- coding: utf-8 -*-
fromxml.etree.ElementIncludeimportinclude
fromkivy.appimportApp
fromkivy.langimportBuilder
fromkivy.uix.screenmanagerimportScreenManager, Screen
importdb# Teo: use this line to import the db class
# ----------------------
# Kivy Window management
# ----------------------
classSplashWindow(Screen):
pass
classLoginWindow(Screen):
deflogin_released(self, usnm_input, passw_input):
usnm_input.text=""
passw_input.text=""
return
pass
classProfileWindow(Screen):
pass
classWindowManager(ScreenManager):
pass
kv=Builder.load_file("my.kv")
# ----------------------
# Main Kivy app
# ----------------------
classMyMainApp(App):
defbuild(self):
returnkv
pass
# ----------------------
# Main setup function
# ----------------------
defmain():
# # Teo: use these lines to manipulate database
# Database initialization and tests
db.init()
db.un_exists('userNameThatDoesNotExist')
db.profile_delete('userNameThatDoesNotExist')
db.profile_delete('davidDelSol')
db.profile_new(
'davidDelSol',
'encrypted?',
'david',
'aloka',
'test@preform.io',
'salsa,extended intelligence,marathon running in a full suit'
)
db.profile_new(
'Python733t',
'encrypted?',
'Doroteo ',
'Bonilla',
'doabonilla@yahoo.com',
'work,school,sleep,repeat'
)
db.un_login('davidDelSol', 'encrypted?')
db.profile_update('davidDelSol', pw='definitelyNotEncripted!')
db.un_login('davidDelSol', 'definitelyNotEncripted!')
db.un_exists('davidDelSol')
db.profile_print(all=True)
db.profile_print(['Python733t'])
db.profile_print('Python733t')
# ----------------------
# Main application function
# ----------------------
if__name__=="__main__":
# Run setup
main()
# Run Kivy app
MyMainApp().run()