what is wrong with my code???
login.py
class NewApp(MDApp):
def build(self):
self.theme_cls.theme_style="Dark"
self.theme_cls.primary_palette="Blue"
self.strng = Builder.load_string(help_str)
i am trying to call this function on the press of the submit button.the function is getting called yet its showing an attribute error
def check_admin(self):
self.id=self.strng.get_screen('adminloginpage').ids.adminid.text
self.adpassword=self.strng.get_screen('adminloginpage').ids.adminpassword.text
the kv code
help_str='''
<AdminloginPage>:
name:'adminloginpage'
BoxLayout:
orientation:'vertical'
size:root.width,root.height
MDLabel:
text:"Admin screen"
font_style:"H4"
halign:'center'
pos_hint:{'center_y':0.9}
size_hint:(0.7,0.1)
MDTextField:
id:'adminid'
halign:'center'
hint_text:'enter admin id '
icon_right:'account'
pos_hint:{'center_x':0.5,'center_y':0.5}
size_hint:(0.7,0.1)
helper_text:'Required'
helper_text_mode:'on_error'
required:True
multiline:False
MDTextField:
id:'adminpassword'
halign:'center'
hint_text:'enter admin password '
icon_right:'eye-off'
pos_hint:{'center_x':0.5,'center_y':0.5}
size_hint:(0.7,0.1)
helper_text:'Required'
helper_text_mode:'on_error'
required:True
password:True
multiline:False
MDTextButton:
text: 'submit'
md_bg_color:app.theme_cls.primary_color
user_font_size:'30sp'
size_hint:(0.9,0.5)
on_press:app.check_admin()'''
i am trying to store the userid and password to validate