Skip to content

Commit

Permalink
Merge pull request #2 from zshafiqu/update-UI
Browse files Browse the repository at this point in the history
Version 2.0 of User Interface for vehicleinfo.org
  • Loading branch information
zshafiqu authored Jan 9, 2020
2 parents 0366773 + e1157f6 commit ba72a96
Show file tree
Hide file tree
Showing 114 changed files with 9,381 additions and 18,252 deletions.
Binary file modified .DS_Store
Binary file not shown.
35 changes: 11 additions & 24 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,15 @@ def get_by_year_make_and_model(year, make, model):
# ----------------------
@app.route('/')
def index():
page = 'Home'
return render_template('home.html', page=page)

# return render_template('temp.html')
return render_template('home.html')
# ----------------------
@app.route('/report')
def report():
page = 'Vehicle Report'
return render_template('report.html', page=page)
# return render_template('temp.html')
return render_template('report.html')
# ----------------------
@app.route('/handlerequest', methods=['POST'])
@app.route('/view_report', methods=['POST'])
def handle_request():
# print(request)
page = 'Vehicle Report'
try :
try:
year = request.form['year'].strip()
make = request.form['make'].strip()
model = request.form['model'].strip()
Expand All @@ -167,27 +160,21 @@ def handle_request():
recalls = get_recalls_from_NHTSA(year, make, model)
complaints = get_complaints_from_NHTSA(year, make, model)

return render_template('process_report.html', data=data, recalls=recalls, complaints=complaints, page=page)
return render_template('view_report.html', data=data, recalls=recalls, complaints=complaints)
except:
return render_template('error.html', page=page)
return render_template('error.html')
# ----------------------
@app.route('/api')
def api():
page = 'API Documentation'
return render_template('api.html', page=page)
# return render_template('temp.html')
return render_template('api.html')
# ----------------------
@app.route('/versions')
def versions():
page = 'Version History'
return render_template('versions.html', page=page)
# return render_template('temp.html')
@app.route('/changelog')
def changelog():
return render_template('changelog.html')
# ----------------------
@app.route('/about')
def about():
page = 'About This Project'
return render_template('about.html', page=page)
# return render_template('temp.html')
return render_template('about.html')
# ----------------------
if __name__ == '__main__':
app.run()
Binary file modified static/.DS_Store
Binary file not shown.
Binary file modified static/css/.DS_Store
Binary file not shown.
16 changes: 11 additions & 5 deletions static/css/bootstrap.min.css
100755 → 100644

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion static/css/bootstrap.min.css.map

This file was deleted.

Loading

0 comments on commit ba72a96

Please sign in to comment.