Skip to content

Commit

Permalink
elephantsql
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek-Khanna24 committed Nov 27, 2020
1 parent 6b641f9 commit 756e968
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# ticketmanagment

use pipreqs to chnage the requirements
18 changes: 16 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
import pandas as pd
import streamlit as st
import psycopg2
##import plotly.express as px
##import SessionState
def auth(email,password):
if email == password:
return True
else:
return -1
@st.cache(allow_output_mutation=True)
def connection():


conn = psycopg2.connect(host='suleiman.db.elephantsql.com',
port='5432',
database='ncteubln',
user= 'ncteubln',
password= '2GVWH57HylcCfWVlSE2Z1NqQ0-FklkM7')
#st.write('jvndbnmvcb',conn)
return conn
@st.cache
def get_data():
url = "http://data.insideairbnb.com/united-states/ny/new-york-city/2019-09-12/visualisations/listings.csv"
Expand All @@ -15,12 +27,14 @@ def get_data():
st.title("Issue Management System")
option = st.selectbox('Select your domain/role?',('Reporter', 'Management', 'Employee'))
st.write('Your selected domian:', option)
conn = insert_record2(option)
st.write('jvndbnmvcb',conn)
user_email = st.text_input("Email:")
user_password = st.text_input("Password:")
if st.button('add'):
result = auth(user_email, user_password)
if result != -1:
st.write("Welcome user");
st.write("Welcome user")
else:
st.write("Please check mentioned credentials!");
st.write("Please check mentioned credentials!")

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pandas==1.1.4
streamlit==0.71.0
psycopg2==2.8.6

0 comments on commit 756e968

Please sign in to comment.