Skip to content

Example on making changes on UI, DB schema

JackyBreak edited this page May 11, 2020 · 6 revisions

Example on modifying templates

  1. Run the app on local server (http://127.0.0.1:5000/) by command "python app.py /d/edusample", then browse to the page where I want to make changes
  2. For example, project_profile.html using chrome, press F12, then Ctrl + Shift + C (or the button on the image), click on the element that I want to change: example
  3. Add changes in the style tab on the bottom right corner, that way I am able to see immediate changes on the left side: example1
  4. Then copy and paste modifications to the templates

Example on modifying Database

  1. Make changes to the Table classes in the python file, or add a new class to add in a new table: example

  2. To apply the modification to the local server, I can either delete existing database and rebuild or I can add changes manually to the accout.db a. [rebuild]Delete account.db, then modifying the code at the bottom of app.py, and run the app using the same command to rebuild the database: example

    b. [make changes manually]In windows command line, cd to the folder where account.db lives in, then type "sqlite3 account.db" in cmd, then I'm ready to update changes to the current account.db