This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://blog.setunai.net/20120227/flask%e3%81%ae%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%83%87%e3%82%b3%e3%83%ac%e3%83%bc%e3%82%bf/ | |
from functools import wraps | |
from flask import Flask | |
app = Flask(__name__) | |
def login_required(f): | |
@wraps(f) | |
def decorated_function(*args, **kwargs): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>XHR2/jquery test</title> | |
</head> | |
<body> | |
<input type="text" id="zip" style="width:100px;" value="2210824"> | |
<input type="button" id="run" value="test"> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
// http://blog.setunai.net/20120229/%e3%82%af%e3%83%ad%e3%82%b9%e3%83%89%e3%83%a1%e3%82%a4%e3%83%b3%e3%81%b8%e3%81%ae%e3%82%a2%e3%82%af%e3%82%bb%e3%82%b9%e3%81%8c%e5%9b%9e%e9%81%bf%e3%81%a7%e3%81%8d%e3%82%8bxmlhttprequest2/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>jsonp/jquery test</title> | |
</head> | |
<body> | |
<input type="text" id="url" style="width:300px;" value="http://blog.setunai.net/"> | |
<input type="button" id="run" value="test"> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
(function ($) { |