Skip to content

Commit

Permalink
db_init.py and modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kkhitesh committed Jun 17, 2021
1 parent b71fe9b commit 6a4a4b2
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 29 deletions.
1 change: 0 additions & 1 deletion creds.py

This file was deleted.

File renamed without changes.
13 changes: 13 additions & 0 deletions db_init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import mysql.connector as sql
from modules.creds import user_pwd
from cv_schema_init import *

mycon = sql.connect(host='localhost', user='root', passwd=user_pwd)
cur = mycon.cursor()
cur.execute(CREATE_SCHEMA)
cur.execute(Create_users_Table)
cur.execute(Create_recruiter_Table)
cur.execute(Create_client_Table)
cur.execute(Create_Job_Table)
cur.execute(Create_Application_Table)
mycon.close()
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tkinter import *
from tkinter import messagebox
from login import *
from modules.login import *

root = Tk()
root.geometry("1050x700")
Expand Down
8 changes: 2 additions & 6 deletions client.py → modules/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
from tkinter import messagebox, Label
from tkinter_uix.Entry import Entry
import mysql.connector as sql
import login as l
from creds import user_pwd

# mycon = sql.connect(host='localhost', user='root',passwd=user_pwd, database='mydb')
# cur = mycon.cursor()

import modules.login as l
from modules.creds import user_pwd

def get_details(email):
global name, location, gen, clicid
Expand Down
1 change: 1 addition & 0 deletions modules/creds.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
user_pwd = "Hitesh@20" # use your MySQL Password
12 changes: 4 additions & 8 deletions login.py → modules/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
from tkinter import messagebox
from tkinter_uix.Entry import Entry
import mysql.connector as sql
from register import *
from recruiter import *
from client import *
from creds import user_pwd

# mycon = sql.connect(host='localhost', user='root', passwd=user_pwd, database='mydb')
# cur = mycon.cursor()

from modules.register import *
from modules.recruiter import *
from modules.client import *
from modules.creds import user_pwd

def success(root, email1):
global f
Expand Down
8 changes: 2 additions & 6 deletions recruiter.py → modules/recruiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
from tkinter import messagebox, Label
from tkinter_uix.Entry import Entry
import mysql.connector as sql
import login as l
from creds import user_pwd

# mycon = sql.connect(host='localhost', user='root', passwd=user_pwd, database='mydb')
# cur = mycon.cursor()

import modules.login as l
from modules.creds import user_pwd

def get_details(email):
global name, company, gen, recid
Expand Down
9 changes: 2 additions & 7 deletions register.py → modules/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@
from tkinter import messagebox, Label
from tkinter_uix.Entry import Entry
import mysql.connector as sql
import login as l
from creds import user_pwd

# mycon = sql.connect(host='localhost', user='root',
# passwd=user_pwd, database='mydb')
# cur = mycon.cursor()

import modules.login as l
from modules.creds import user_pwd

def logi(root):
try:
Expand Down

0 comments on commit 6a4a4b2

Please sign in to comment.