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
[global] | |
default-timeout = 60 | |
respect-virtualenv = true | |
download-cache = ~/.pip/cache | |
log-file = ~/.pip/pip.log | |
build = ~/.pip/build | |
use-wheel = yes | |
find-links = /Users/xen/.pip/wheels |
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
$ ab -q -c 50 -n 10000 http://127.0.0.1:8080/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 127.0.0.1 (be patient).....done | |
Server Software: | |
Server Hostname: 127.0.0.1 |
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
[core] | |
excludesfile = /Users/xen/.global_ignore |
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
from flask import Flask, redirect, url_for, session, request | |
from flask_oauth import OAuth | |
SECRET_KEY = 'development key' | |
DEBUG = True | |
GITHUB_CLIENT_ID = '<Client-ID>' | |
GITHUB_CLIENT_SECRET = '<Client-Secret>' | |
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
# -*- coding: utf-8 -*- | |
""" PyLinter Sublime Text Plugin | |
** THIS IS THE SUBLIME TEXT 3 TEST VERSION OF PYLINTER! ** | |
This is a Pylint plugin for Sublime Text. | |
Copyright R. de Laat, Elit 2011-2013 |
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
# в текущий момент работает даже такой вариант | |
from hopak import models | |
class User(models.Model): | |
# во время создания класса конструктор пытается найти в той же папке где и этот файл | |
# файл user.yaml, который строится из имени класса и расширения .yaml | |
pass |
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
from hopak import models | |
class User(models.Model): | |
__yaml__ = 'user.yaml' # явно указываем файл, можно указать полный путь если лежат в другом месте | |
title = fields.StringField(title="News Title", length=80, required=True) | |
body = field.TextField() | |
# если надо сделать класс без импорта из .yaml файла то убирается директива __yaml__ | |
class NewUser(models.Model): |
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
from flask import Flask | |
from flask.ext.hopak import Admin # Serduchka's danzing nao | |
from flask.ext.pymongo import PyMongo | |
import models | |
def create_app(): | |
# Create flask app | |
app = Flask(__name__) |
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
from flask import Flask | |
from flask.ext import hopak | |
from flask.ext.pymongo import PyMongo | |
import models | |
def create_app(): | |
# Create flask app | |
app = Flask(__name__) |
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
from flask import Flask, render_template | |
from flask.ext import gear | |
from flask.ext.pymongo import PyMongo | |
from formgear.models import Model, ModelRegistry | |
from formgear.utils import rel | |
from formgear.ds.mongo import MongoDS | |
class Post(Model): |