Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
from fabric.api import env, local, require | |
def deploy(): | |
"""fab [environment] deploy""" | |
require('environment') | |
maintenance_on() | |
push() | |
syncdb() | |
migrate() |
from flask import Flask, send_from_directory | |
app = Flask(__name__) | |
@app.route('/base/<path:filename>') | |
def base_static(filename): | |
return send_from_directory(app.root_path + '/../static/', filename) |
sudo ln /usr/bin/gcc /usr/bin/gcc-4.2 |
""" | |
Test if a request is XHR. | |
""" | |
import argparse | |
from flask import Flask, request, jsonify, make_response | |
app = Flask(__name__) | |
"Customize Flask to select a template based on some criteria." | |
import os | |
from flask import Flask, request, render_template | |
from flask.helpers import locked_cached_property | |
from jinja2 import FileSystemLoader, TemplateNotFound | |
# Import a detection utility from your project, not defined here. | |
# Takes a request object and returns True if browser is mobile. |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...