# In this example, I use blueprint plugin
@bp.route('/', methods=['PUT'])
def create_resource():
return
vs class Resource(...):
def on_put(self, request, response):
return
Mirror: https://pastebin.com/50W8TJV2 # Flask; assuume `app` exists
from flask import g
@app.before_request
def before_request():
g.some_variable = 'foobar'
vs class ExampleComponent(object):
def process_request(self, req, resp):
req.some_variable = 'foobar'
Mirror: https://pastebin.com/Z3yGCfzF http://sterlicht.alwaysdata.net/transcrypt.org/docs/html/special_facilities.html#inserting-literal-javascript-pragma-js-and-include
vs
transcrypt.org/docs/html/special_facilities.html#inserting-literal-javascript-pragma-js-and-include
Edit: I couldn’t even spam back to get out, it would go back and then pull me forward to next question. I had to just change the URL back to HN.