CS133 Databases: Virtual Room Draw for Pomona College
Demo video for the project: https://www.youtube.com/watch?v=GuKkBkAkFv4&t=78s
Milestone 3: https://www.overleaf.com/9449242656bcnbymkbknks
Milestone 2: https://www.overleaf.com/1142286357jtkcpvvqnxyw
SHARED FOLDER: https://drive.google.com/drive/folders/1OzhyUGDP3FL8qc6LNfxDPc3itNJeBiOh?usp=sharing
milestone 2 Doc: https://docs.google.com/document/d/1i_KFfRNegjPZRX6PrNN8XlIa9H4p8LpQQXTtKo-DGWg/edit?fbclid=IwAR3b6Ey94koVqntcKDE-PvlmGKSEq5ysap1M47hqCpkEblObW2VAjWd5_28
Milestone 0: https://docs.google.com/document/d/1oqUyrVeIod7JRTgFklCOZwkpGrdnPXMqxyjEtXB8oyk/edit
- Check if you have Python 3 by typing
python3
. If a python command line pops up, skip to step 3 - Run
brew install python
. Go to step 1. - Run
echo "alias python=python3" >> ~/.bashrc
andecho "alias python=python3" >> ~/.zshrc
- Run
pip3 install jinja2
. Jinja is for printing things from Python and Flask
- Install mySQL from this website
- Also install the mySQL workbench from here
- I think yall have a Mac so to start the mySQL server:
- go to System Preferences > MySQL (bottom row) > Initialize Database > type
databases133
into the password field and select the Legacy Password Encryption option (you can make this password whatever you want, but in the sagedorm_db app the password is hardcoded as databases133) - click Start MySQL Server
- go to System Preferences > MySQL (bottom row) > Initialize Database > type
- Run
pip3 install mysql-connector
on the terminal
- At the root of this directory, run
python sagedorm_db.py
. This intializes the SageDorms database. - Open the mySQL Workbench app. It's somewhere in your apps folder. Then click the rectangle that says "Local instance 3306" underneath MySQL connections. Type in the password if prompted (databases133 if you didn't change it).
- In the menu bar, click File > Open SQL Script (or press Shift + Command + O) and select the Pop_Students.sql file in the test_files folder.
- Double click sagedormdb in the sidebar. Then run the sql file by clicking the thunderbolt above the console. This just adds students to register housing for.
- Now open a new terminal window and run
python app.py
. It should say something like "Running on http://127.0.0.1:5000/" - Open your web browser and type "localhost:5000" in the URL. In the Student ID field, type in an existing sid from the database. Click submit and now the housing is registered!