Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(32)  |  Call(10)  |  Derive(6)  |  Import(16)
Runs a Python shell inside Flask application context.

:param banner: banner appearing at top of shell when started
:param make_context: a callable returning a dict of variables
                     used in the shell namespace. By default
                     returns a dict consisting of just the app.
:param use_bpython: use BPython shell if available, ignore if not.
                    The BPython shell can be turned off in command
                    line by passing the **--no-bpython** flag.
:param use_ipython: use IPython shell if available, ignore if not.(more...)

src/p/y/python-social-auth-HEAD/examples/flask_me_example/manage.py   python-social-auth(Download)
#!/usr/bin/env python
import sys
 
from flask.ext.script import Server, Manager, Shell
 
manager = Manager(app)
manager.add_command('runserver', Server())
manager.add_command('shell', Shell(make_context=lambda: {
    'app': app,
    'db': db

src/p/y/python-social-auth-HEAD/examples/flask_example/manage.py   python-social-auth(Download)
#!/usr/bin/env python
import sys
 
from flask.ext.script import Server, Manager, Shell
 
manager = Manager(app)
manager.add_command('runserver', Server())
manager.add_command('shell', Shell(make_context=lambda: {
    'app': app,
    'db': db

src/r/g/RGVRSEF-HEAD/manage.py   RGVRSEF(Download)
from hashlib import sha256
 
from flask.ext.script import Manager,Server,prompt_pass,prompt,prompt_bool,Shell
from RGVRSEF import app
import RGVRSEF.models as models
 
try:
    manager.add_command("shell", Shell(use_bpython=True,
                        make_context=_make_context))
except TypeError:
    manager.add_command("shell", Shell(make_context=_make_context))

src/f/l/flaskbb-HEAD/manage.py   flaskbb(Download)
from flask import current_app
from sqlalchemy.exc import IntegrityError, OperationalError
from flask.ext.script import (Manager, Shell, Server, prompt, prompt_pass,
                              prompt_bool)
from flask.ext.migrate import MigrateCommand
def make_shell_context():
    return dict(app=current_app, db=db)
manager.add_command("shell", Shell(make_context=make_shell_context))
 
 

src/f/l/flask-bones-HEAD/manage.py   flask-bones(Download)
from flask.ext.script import Server, Shell, Manager
from app import create_app
from app.database import db
from app import config
from tests import make_db
manager = Manager(create_app(config=config.dev_config))
manager.add_command('runserver', Server())
manager.add_command('shell', Shell(make_context=_make_context))
 
 

src/f/l/flasky-HEAD/manage.py   flasky(Download)
from app import create_app, db
from app.models import User, Follow, Role, Permission, Post, Comment
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
 
    return dict(app=app, db=db, User=User, Follow=Follow, Role=Role,
                Permission=Permission, Post=Post, Comment=Comment)
manager.add_command("shell", Shell(make_context=make_shell_context))
manager.add_command('db', MigrateCommand)
 

src/s/l/Slingr-0.0.13/slingr/manage.py   Slingr(Download)
 
import os.path
from flask.ext.script import Manager, Server, Shell, Option
 
import slingr.build
manager.add_command(
    "shell",
    Shell(make_context=_make_context))
 
def sling():

src/c/o/coaster-0.4.1/coaster/manage.py   coaster(Download)
from alembic.script import ScriptDirectory
from alembic.util import CommandError
from flask.ext.script import Manager, prompt_bool, Shell
from flask.ext.script.commands import Clean, ShowUrls
from flask.ext.alembic import ManageMigrations
    manager.add_command("showurls", ShowUrls())
    manager.add_command("migrate", InitedMigrations())
    manager.add_command("shell", Shell(make_context=_make_context))
    return manager
 

src/t/a/tango-core-HEAD/tango/manage.py   tango-core(Download)
from flask.ext.script import Manager as BaseManager
from flask.ext.script import Server as BaseServer
from flask.ext.script import Shell as BaseShell
 
from tango.app import Tango
class Shell(BaseShell):
    description = 'Runs a Python shell inside Tango application context.'
 
    def get_options(self):
        return (Option('site'),) + BaseShell.get_options(self)

src/t/a/Tango-0.2.7/tango/manage.py   Tango(Download)
from flask.ext.script import Manager as BaseManager
from flask.ext.script import Server as BaseServer
from flask.ext.script import Shell as BaseShell
 
from tango.app import Tango
class Shell(BaseShell):
    description = 'Runs a Python shell inside Tango application context.'
 
    def get_options(self):
        return (Option('site'),) + BaseShell.get_options(self)

  1 | 2  Next