Skip to content

Boscillator/PlasticDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlasticDB

Database for storing sinilator testing resalts

##Settup Clone the repository Go to the code directory Run 'python makeDb.py'

##Run Go to the code directory Run 'python debug.py'

##Architecture The app consistes of a python module containing a flask app. The app and db objects from it are minipulated for running ###debug.py Imports app from Server and runs it with debug. ###makeDb.py Imports db from Server and runs create_all() on it ###init.py Creates flask app and db, does inizilization ###models.py The sql models. These objects are used for storing the samples events and messurement. Columns not programaticly generated are past in throught the init() function ###routes.py Contains the apps routes. Documentation is in the file ###base.html Base for template file, if you need to add javascript librares or css do it inside the head tag of this file. ###other html files These are the varius templates for displying data.

##Adding more field If you need to add more files folow these instructions

  1. Update models. You will need to add more columns in the space above the init function. You will also need to change the init function's paramiters. Make sure to update this everywhere the function is called. This will mostly be in the routes.py file

  2. Update the form. Add more fields to the creation form. A tutorial on bootstrap forms is avalible at http://www.w3schools.com/bootstrap/bootstrap_forms_inputs.asp. Set the name paramiter to the name of the column

  3. Update the routes. In the if statement that sees if request.method == 'POST' there is a sections that gets variables and sets them equal to form['name']. Add more of these.

  4. Deleat the database.db file (THIS WILL Delete ALL WORK So MAKE A BACKUP)

  5. Run makeDb.py

##Pushing to server

  1. Commit and push changes
  2. SSH to server with account lhc
  3. cd to PlasticDB
  4. run ./stop.sh
  5. run git pull
  6. run mysql -u root -p
  7. enter password
  8. run DROP DATABASE PlasticDB;
  9. run CREATE DATABASE PlasticDB;
  10. run quit;
  11. You should now be back in bash
  12. cd to code
  13. run python makeDB.py
  14. cd ..
  15. run ./start.sh

About

Database for storing sinilator testing resalts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published