File tree 3 files changed +44
-155
lines changed
3 files changed +44
-155
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import streamlit as st
2
+ from frontend .utils .sidebar import set_sidebar
3
+
4
+ set_sidebar (
5
+ user = {
6
+ "full_name" : "John Doe" ,
7
+ "avatar_url" : "https://avatars.githubusercontent.com/u/832385?s=200&v=4" ,
8
+ }
9
+ )
10
+
11
+
12
+ st .title ("Update Team" )
13
+
14
+
15
+ def get_team_id (supabase , div , roll_no ):
16
+ try :
17
+ response = (
18
+ supabase .table ("students" )
19
+ .select ("team_id" )
20
+ .eq ("div" , div )
21
+ .eq ("roll_no" , roll_no )
22
+ .execute ()
23
+ )
24
+ return response .data [0 ]["team_id" ]
25
+ except Exception as e :
26
+ print (e )
27
+ return 0
28
+
29
+
30
+ def get_team_no (supabase , div , roll_no ):
31
+ team_id = get_team_id (supabase , div , roll_no )
32
+ try :
33
+ response = supabase .table ("teams" ).select ("team_no" ).eq ("id" , team_id ).execute ()
34
+ return response .data [0 ]["team_no" ]
35
+ except Exception as e :
36
+ print (e )
37
+ return 0
38
+
39
+
40
+ st .subheader (f"You are in team div - team_no" )
41
+
42
+
43
+ if __name__ == "__main__" :
44
+ st .write ("Team number" )
You can’t perform that action at this time.
0 commit comments