-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,155 changed files
with
184,312 additions
and
23 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from flask import Flask | ||
from flask_sqlalchemy import SQLAlchemy | ||
from flask_login import LoginManager | ||
from flask_wtf import CSRFProtect | ||
from flask_uploads import UploadSet, configure_uploads, ALL | ||
from config import config | ||
|
||
db = SQLAlchemy() | ||
login_manager = LoginManager() | ||
login_manager.login_view = 'wap.login' | ||
login_manager.login_message = "账号登录失效" | ||
csrf = CSRFProtect() | ||
|
||
fileUpload = UploadSet('files', ALL) | ||
|
||
def create_app(config_name): | ||
app = Flask(__name__) | ||
app.config.from_object(config[config_name]) | ||
|
||
config[config_name].init_app(app) | ||
db.init_app(app) | ||
login_manager.init_app(app) | ||
csrf.init_app(app) | ||
configure_uploads(app, fileUpload) | ||
|
||
from .wap import wap as wap_blueprint | ||
app.register_blueprint(wap_blueprint) | ||
|
||
from .www import www as www_blueprint | ||
app.register_blueprint(www_blueprint, url_prefix='/www') | ||
|
||
return app |
Binary file not shown.
Empty file.
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
</head> | ||
<body> | ||
|
||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
</head> | ||
<body> | ||
|
||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from flask import Blueprint | ||
|
||
wap = Blueprint('wap', __name__) | ||
|
||
from . import views |
Binary file not shown.
Binary file not shown.
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from . import wap | ||
|
||
@wap.route('/') | ||
def index(): | ||
return '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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from flask import Blueprint | ||
|
||
www = Blueprint('www', __name__) | ||
|
||
from . import views |
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import os | ||
basedir = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
class Config: | ||
SQLALCHEMY_TRACK_MODIFICATIONS = True | ||
SECRET_KEY = '1234567890123456789012345678901234567890' | ||
UPLOADS_DEFAULT_DEST = basedir + '/app/static' | ||
FLASKY_ADMIN = '13167288970' | ||
SERVER_NAME = '192.168.0.147:5000' | ||
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:19920720@127.0.0.1/smart' | ||
DEBUG = True | ||
if not os.path.exists(UPLOADS_DEFAULT_DEST): | ||
os.mkdir(UPLOADS_DEFAULT_DEST) | ||
|
||
@staticmethod | ||
def init_app(app): | ||
pass | ||
|
||
|
||
class Release: | ||
SQLALCHEMY_TRACK_MODIFICATIONS = True | ||
SECRET_KEY = '\xc3m\x0e\xae\x1c\xcbs\x06pF\xa8\xe1\x84o\xaf\xe90\x00R=j\xce\x93&' | ||
UPLOADS_DEFAULT_DEST = basedir + '/app/static' | ||
FLASKY_ADMIN = '13167288970' | ||
SERVER_NAME = 'm.antporters.com' | ||
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:lYp926233@127.0.0.1/share' | ||
DEBUG = False | ||
TESTING = False | ||
if not os.path.exists(UPLOADS_DEFAULT_DEST): | ||
os.mkdir(UPLOADS_DEFAULT_DEST) | ||
|
||
@staticmethod | ||
def init_app(app): | ||
pass | ||
|
||
config = { | ||
'default': Config, | ||
'release': Release | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from app import create_app, db | ||
from flask_migrate import Migrate, MigrateCommand | ||
from flask_script import Manager, Shell | ||
from flask import render_template | ||
|
||
# 测试 | ||
app = create_app('default') | ||
|
||
manager = Manager(app) | ||
migrate = Migrate(app, db) | ||
|
||
def make_shell(): | ||
return {'app': app, 'db': db} | ||
|
||
manager.add_command('shell', Shell(make_context=make_shell)) | ||
manager.add_command('db', MigrateCommand) | ||
|
||
@app.errorhandler(404) | ||
def page_not_found(e): | ||
return render_template('404.html'), 404 | ||
|
||
@app.errorhandler(500) | ||
def internal_server_error(e): | ||
return render_template('500.html'), 500 | ||
|
||
if __name__ == '__main__': | ||
manager.run() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from app import create_app | ||
from flask import render_template | ||
|
||
|
||
app = create_app('release') | ||
|
||
@app.errorhandler(404) | ||
def page_not_found(e): | ||
return render_template('404.html'), 404 | ||
|
||
@app.errorhandler(500) | ||
def internal_server_error(e): | ||
return render_template('500.html'), 500 | ||
|
||
if __name__ == '__main__': | ||
app.run() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
alembic==1.0.6 | ||
Click==7.0 | ||
Flask==1.0.2 | ||
Flask-Login==0.4.1 | ||
Flask-Migrate==2.3.1 | ||
Flask-Script==2.0.6 | ||
Flask-SQLAlchemy==2.3.2 | ||
Flask-Uploads==0.2.1 | ||
Flask-WTF==0.14.2 | ||
itsdangerous==1.1.0 | ||
Jinja2==2.10 | ||
Mako==1.0.7 | ||
MarkupSafe==1.1.0 | ||
python-dateutil==2.7.5 | ||
python-editor==1.0.3 | ||
six==1.12.0 | ||
SQLAlchemy==1.2.16 | ||
Werkzeug==0.14.1 | ||
WTForms==2.2.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/Users/lihao/Documents/Python/smart/venv/bin/python | ||
# EASY-INSTALL-ENTRY-SCRIPT: 'alembic==1.0.6','console_scripts','alembic' | ||
__requires__ = 'alembic==1.0.6' | ||
import re | ||
import sys | ||
from pkg_resources import load_entry_point | ||
|
||
if __name__ == '__main__': | ||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) | ||
sys.exit( | ||
load_entry_point('alembic==1.0.6', 'console_scripts', 'alembic')() | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/Users/lihao/Documents/Python/smart/venv/bin/python | ||
# EASY-INSTALL-ENTRY-SCRIPT: 'Mako==1.0.7','console_scripts','mako-render' | ||
__requires__ = 'Mako==1.0.7' | ||
import re | ||
import sys | ||
from pkg_resources import load_entry_point | ||
|
||
if __name__ == '__main__': | ||
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) | ||
sys.exit( | ||
load_entry_point('Mako==1.0.7', 'console_scripts', 'mako-render')() | ||
) |
44 changes: 44 additions & 0 deletions
44
venv/lib/python3.6/site-packages/Flask_Login-0.4.1-py3.6.egg-info/PKG-INFO
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Metadata-Version: 1.1 | ||
Name: Flask-Login | ||
Version: 0.4.1 | ||
Summary: User session management for Flask | ||
Home-page: https://github.com/maxcountryman/flask-login | ||
Author: Matthew Frazier | ||
Author-email: leafstormrush@gmail.com | ||
License: MIT | ||
Description: | ||
Flask-Login | ||
----------- | ||
|
||
Flask-Login provides user session management for Flask. It handles the common | ||
tasks of logging in, logging out, and remembering your users' | ||
sessions over extended periods of time. | ||
|
||
Flask-Login is not bound to any particular database system or permissions | ||
model. The only requirement is that your user objects implement a few | ||
methods, and that you provide a callback to the extension capable of | ||
loading users from their ID. | ||
|
||
Links | ||
````` | ||
* `documentation <https://flask-login.readthedocs.io/en/latest/>`_ | ||
* `development version <https://github.com/maxcountryman/flask-login>`_ | ||
|
||
Platform: any | ||
Classifier: Development Status :: 4 - Beta | ||
Classifier: Environment :: Web Environment | ||
Classifier: Intended Audience :: Developers | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Operating System :: OS Independent | ||
Classifier: Programming Language :: Python | ||
Classifier: Programming Language :: Python :: 2.6 | ||
Classifier: Programming Language :: Python :: 2.7 | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: Programming Language :: Python :: 3.3 | ||
Classifier: Programming Language :: Python :: 3.4 | ||
Classifier: Programming Language :: Python :: 3.5 | ||
Classifier: Programming Language :: Python :: 3.6 | ||
Classifier: Programming Language :: Python :: Implementation :: CPython | ||
Classifier: Programming Language :: Python :: Implementation :: PyPy | ||
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content | ||
Classifier: Topic :: Software Development :: Libraries :: Python Modules |
20 changes: 20 additions & 0 deletions
20
venv/lib/python3.6/site-packages/Flask_Login-0.4.1-py3.6.egg-info/SOURCES.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
LICENSE | ||
MANIFEST.in | ||
README.md | ||
setup.cfg | ||
setup.py | ||
Flask_Login.egg-info/PKG-INFO | ||
Flask_Login.egg-info/SOURCES.txt | ||
Flask_Login.egg-info/dependency_links.txt | ||
Flask_Login.egg-info/not-zip-safe | ||
Flask_Login.egg-info/requires.txt | ||
Flask_Login.egg-info/top_level.txt | ||
Flask_Login.egg-info/version_info.json | ||
flask_login/__about__.py | ||
flask_login/__init__.py | ||
flask_login/_compat.py | ||
flask_login/config.py | ||
flask_login/login_manager.py | ||
flask_login/mixins.py | ||
flask_login/signals.py | ||
flask_login/utils.py |
1 change: 1 addition & 0 deletions
1
venv/lib/python3.6/site-packages/Flask_Login-0.4.1-py3.6.egg-info/dependency_links.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
23 changes: 23 additions & 0 deletions
23
venv/lib/python3.6/site-packages/Flask_Login-0.4.1-py3.6.egg-info/installed-files.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
../flask_login/__about__.py | ||
../flask_login/__init__.py | ||
../flask_login/__pycache__/__about__.cpython-36.pyc | ||
../flask_login/__pycache__/__init__.cpython-36.pyc | ||
../flask_login/__pycache__/_compat.cpython-36.pyc | ||
../flask_login/__pycache__/config.cpython-36.pyc | ||
../flask_login/__pycache__/login_manager.cpython-36.pyc | ||
../flask_login/__pycache__/mixins.cpython-36.pyc | ||
../flask_login/__pycache__/signals.cpython-36.pyc | ||
../flask_login/__pycache__/utils.cpython-36.pyc | ||
../flask_login/_compat.py | ||
../flask_login/config.py | ||
../flask_login/login_manager.py | ||
../flask_login/mixins.py | ||
../flask_login/signals.py | ||
../flask_login/utils.py | ||
PKG-INFO | ||
SOURCES.txt | ||
dependency_links.txt | ||
not-zip-safe | ||
requires.txt | ||
top_level.txt | ||
version_info.json |
1 change: 1 addition & 0 deletions
1
venv/lib/python3.6/site-packages/Flask_Login-0.4.1-py3.6.egg-info/not-zip-safe
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
1 change: 1 addition & 0 deletions
1
venv/lib/python3.6/site-packages/Flask_Login-0.4.1-py3.6.egg-info/requires.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Flask |
1 change: 1 addition & 0 deletions
1
venv/lib/python3.6/site-packages/Flask_Login-0.4.1-py3.6.egg-info/top_level.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
flask_login |
6 changes: 6 additions & 0 deletions
6
venv/lib/python3.6/site-packages/Flask_Login-0.4.1-py3.6.egg-info/version_info.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"release_date": null, | ||
"version": "0.4.0", | ||
"maintainer": "", | ||
"body": "" | ||
} |
1 change: 1 addition & 0 deletions
1
venv/lib/python3.6/site-packages/Flask_Migrate-2.3.1.dist-info/INSTALLER
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pip |
28 changes: 28 additions & 0 deletions
28
venv/lib/python3.6/site-packages/Flask_Migrate-2.3.1.dist-info/METADATA
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Metadata-Version: 2.1 | ||
Name: Flask-Migrate | ||
Version: 2.3.1 | ||
Summary: SQLAlchemy database migrations for Flask applications using Alembic | ||
Home-page: http://github.com/miguelgrinberg/flask-migrate/ | ||
Author: Miguel Grinberg | ||
Author-email: miguelgrinberg50@gmail.com | ||
License: MIT | ||
Platform: any | ||
Classifier: Environment :: Web Environment | ||
Classifier: Intended Audience :: Developers | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Operating System :: OS Independent | ||
Classifier: Programming Language :: Python | ||
Classifier: Programming Language :: Python :: 2 | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content | ||
Classifier: Topic :: Software Development :: Libraries :: Python Modules | ||
Requires-Dist: Flask (>=0.9) | ||
Requires-Dist: Flask-SQLAlchemy (>=1.0) | ||
Requires-Dist: alembic (>=0.7) | ||
|
||
Flask-Migrate | ||
-------------- | ||
|
||
SQLAlchemy database migrations for Flask applications using Alembic. | ||
|
||
|
Oops, something went wrong.