Increment Addon
Mississippi College
Computer Science
Dr. Bennet
Flask
Counter
Init
Schema
DB Util
Incrementer Add-On
Regular Views
Register View
Form Check JS
Style
Base Tmpl
Counter Tmpl
Reg Tmpl
Added to each view function so the counter always gets incremented
import functools from flask import session def inccnt(view): @functools.wraps(view) def wrapped_view(**kwargs): session['count'] += 1 return view(**kwargs) return wrapped_view
[download]