Question: I m trying to create a web - based program showing an employee tracking sheet. The application could start with a form with employee information

Im trying to create a web-based program showing an employee tracking sheet. The application could start with a form with employee information such as (personal info, hours worked, pay rate, etc..) Once the information is entered, the program should calculate how much they'll be paid and then write all this information into a CSV file. I have the project folder, templates, static, CSS. I get getting and error for app.py Im not sure how to fix this.
window = create_webview()
NameError: name 'create_webview' is not defined
App.py
from flask import Flask, render_template, request
import csv
import webview
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/calculate', methods=['POST'])
def calculate():
# Remaining code for data calculations and file operations
def create_webview():
return webview.create_window("Employee Tracking", "http://127.0.0.1:5000/")
if __name__=='__main__':
window = create_webview()
webview.start()
app.run()
index.html
Employee Tracking
Hello, {{ name }}!Your total pay is: ${{ total_pay }}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!