예제 #1
0
# -----------------------------------------------------------------------------------------
#
# Program:      My Python Blog
#
# Author:       Hasan Abdulhamid
#
# Description:  Personal blog about learning and building with Python.
#               Features user registration, profiles and posting.
#
# File:         run.py - This is the main file for My Python Blog
#
# -----------------------------------------------------------------------------------------

from pyblog import app

if __name__ == '__main__':
    app.run(debug=True)
예제 #2
0
#################################################
#######                                   #######
#######             MAIN.PY               #######
#######                                   ####### 
#################################################


import sys
print("exe:",sys.executable)

from pyblog import app



if __name__ == "__main__":
    app.run()
예제 #3
0
from pyblog import app as pyblog_app
from pyblog import models, db, forms
import flask


@pyblog_app.shell_context_processor
def make_shell_context():
    return {
        'app': pyblog_app,
        'models': models,
        'db': db,
        'forms': forms,
        'flask': flask
    }


if __name__ == "__main__":
    pyblog_app.run(debug=True, port=5000)
예제 #4
0
#################################################
#######                                   #######
#######             MAIN.PY               #######
#######                                   #######
#################################################

from pyblog import models, forms, routes
from pyblog import app, db


@app.shell_context_processor
def shell_context():
    return {
        'models': models,
        'app': app,
        'db': db,
        'forms': forms,
        'routes': routes,
        'myname': 'eyal'
    }


if __name__ == "__main__":
    app.run(host='0.0.0.0', port=5000)