KamandPrompt / SAC-Portal

SAC Portal for IIT Mandi
2 stars 17 forks source link

Added Connecton and Updated Make_Tables #23

Closed Signior-X closed 4 years ago

Signior-X commented 4 years ago

I have added the database connection to the flask by importing a file know as mysqlconnect.py If anyone needs a connection just they need to import mydb from this file, and can execute statements. I have also added a file in Make_Tables, by that other contributors can easily copy code from it to insert or see the tables as many of them don't know the schema of the tables still. Also Suggestion expected.

Signior-X commented 4 years ago

I have done some mistakes, so corrected it

Signior-X commented 4 years ago

init.py is necessary it defines that the Make_Tables folder is a python folder okay, i was thinking that I am removing them. okay, trying to get it done in the mysqlconnect.py file

Signior-X commented 4 years ago

Did what you suggested, check them Also, in the flask app, anyone can execute the statements using the mycursor and mydb, or if he wants, he can create the insert statements using the create_insert_statement function.

Milind712000 commented 4 years ago

According to this empty inti.py are redundant https://stackoverflow.com/questions/37139786/is-init-py-not-required-for-packages-in-python-3-3

Signior-X commented 4 years ago

Yes, I read it, init.py is not needed. Done. Check it if any other change is needed.