You've already forked DBViewerOnStreamlit
mirror of
https://github.com/Llloooggg/DBViewerOnStreamlit.git
synced 2026-03-06 13:06:24 +03:00
Start
This commit is contained in:
37
DBViewer.py
Normal file
37
DBViewer.py
Normal file
@@ -0,0 +1,37 @@
|
||||
import streamlit as st
|
||||
import pymysql
|
||||
import modules.mainPage
|
||||
import modules.ticketsViewer
|
||||
import modules.ticketsMaker
|
||||
import modules.usersEditor
|
||||
|
||||
|
||||
connection = pymysql.connect(
|
||||
host='localhost',
|
||||
user='UserForDBViewerOnStreamlit',
|
||||
password='123',
|
||||
db='DBForDBViewerOnStreamlit'
|
||||
)
|
||||
|
||||
st.sidebar.title('Навигация')
|
||||
pages = st.sidebar.radio('Страницы', ['Главная',
|
||||
'Просмотр заявок',
|
||||
'Создание заявок',
|
||||
'Управление пользователями']
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
if pages == 'Главная':
|
||||
modules.mainPage.main()
|
||||
elif pages == 'Просмотр заявок':
|
||||
modules.ticketsViewer.main(connection)
|
||||
elif pages == 'Создание заявок':
|
||||
modules.ticketsMaker.main(connection)
|
||||
elif pages == 'Управление пользователями':
|
||||
modules.usersEditor.main(connection)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user