- A flask webapp for performing INSERT, UPDATE, DELETE, RENAME, WHERE operations in oCEO database
Assignment-4: here
- Create a python virtual environment [Recommended]
- Go to powershell(being in project directory) and follow the below steps :-
-
Command:
pip install virtualenv
(enter) -
then type
virtualenv env
(enter) -
Now, we have to activate this python virtual environment using command:
.\env\Scripts\activate.ps1
(press enter) -
install python packages(flask, pyyaml, flask-mysqldb) using command:
pip install flask pyyaml flask-mysqldb
(enter) -
Finally type command to run the flask-webapp:
python .\app.py
(press enter)
-
sometime while activating python virtual env. we get an error as shown
-
to remove this, open
windows powershell
asadmin
and do as shown in Screenshot
- install Flask(python web framework) using the commands as shown :
- py -m pip install flask
- Now, check their versions using command as shown :-
- Then install following pip packages :-
- pip3 install flask-mysqldb
- pip3 install pyyaml
- command: python app.py (press enter)
- then in terminal we get the ouput as shown in screenshot below
- On clicking the default PORT(shown with arrow mark)[on clicking the link] : we will our app running and displays the homepage
- On clicking the IITGN-logo, we get 3 options as follows:-
- Login As Student
- Login As Professor
- Login As Admin
- On clicking "Login As Student" we get the UI as shown :-
- On clicking "Login As Professor" we get the UI as shown :-
- On clicking "Login As Admin" we get the UI as shown :-
- Professor login page
- Operation performed in MySQL workbench
- Updated date get reflected in table shown
- before update
- before update in schema
- updated data in schema
- Alert dialog box to confirm the update operation
Dynamic execution in the frontEnd
- Before delete operation
- Before delete in schema(i.e MySQL workbench)
- Alert Box for confirming deletion operation
- After delete operation from Schema(from MySQL workbench)
- deletion operation on table showing Dynamic Execution
- These data of student will be stored in student table in oceo database
- Student will be prompted with "Student Login" page as shown below
- The updated data can be viewed from mySQL Workbench