TheLethalCode / Artemis-arrow

14 stars 31 forks source link

no js 404 and signup #34

Closed dewangmodi closed 5 years ago

TheLethalCode commented 5 years ago

Hey, mind explaining what the PR does and how it does it? This is a good practice when you send a PR

TheLethalCode commented 5 years ago

Why did you change the location of the js folder?

dewangmodi commented 5 years ago
  1. I didn't understand properly, but the js 404 issue which I told in chat was because the directory was not at correct level. The recommended solution everywhere was to move js files in static folder.
  2. The js file didn't have query for 'post' and the file 'app.py' had no interaction when sign-up was done. Therefore I added a new function which gets called on 'POST', and if it is signup, adds the field to the database. I haven't done it for login though.
TheLethalCode commented 5 years ago

hey, the config variables will be better off in a separate python file config.py (That's the convention). And change the post route from '/' to something else. Change it in the front end too

dewangmodi commented 5 years ago

I made the changes,post now occurs at /signup

TheLethalCode commented 5 years ago

I am not familiar with sql. What does export.sql do?

dewangmodi commented 5 years ago

in sql database, i made a table called people which stores the information after signup. I also wrote a procedure in sql createUser. So I had to export the mysql database, which should be imported in your installation of mysql.

TheLethalCode commented 5 years ago

But can't all of these done with python itself?

dewangmodi commented 5 years ago

I have redone the signup part from scratch. This requires mysql-connector https://www.w3schools.com/python/python_mysql_getstarted.asp Also, for local mysql, use correct username password

TheLethalCode commented 5 years ago

What is the use of the txt file?

dewangmodi commented 5 years ago

it stores the definition of the table, kept it in txt file so it is easier to change if required There may be parts like limiting the number of characters, so it should be better this way If database doesn't exist, a database and table is created using txt file

TheLethalCode commented 5 years ago

@dewangmodi what happened to moving the js folder under static?