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

All Samples(18)  |  Call(9)  |  Derive(0)  |  Import(9)
A SQLAlchemy datastore implementation for Flask-Security that assumes the
use of the Flask-SQLAlchemy extension.

src/f/l/flask-security-example-HEAD/app.py   flask-security-example(Download)
from flask.ext.mail import Mail
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.security import Security, SQLAlchemyUserDatastore, \
     UserMixin, RoleMixin
 
 
# Setup Flask-Security
user_datastore = SQLAlchemyUserDatastore(db, User, Role)
security = Security(app, user_datastore)
 

src/f/l/flask-social-example-HEAD/app/__init__.py   flask-social-example(Download)
 
from flask import redirect, url_for, session
from flask.ext.assets import Environment
from flask.ext.security import Security, SQLAlchemyUserDatastore
from flask.ext.social import Social, SQLAlchemyConnectionDatastore, \
from . import assets, models, views
 
security_ds = SQLAlchemyUserDatastore(db, models.User, models.Role)
social_ds = SQLAlchemyConnectionDatastore(db, models.Connection)
 

src/w/h/wharf-HEAD/wharf/__init__.py   wharf(Download)
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.security import Security
from flask.ext.security import SQLAlchemyUserDatastore
from flask.ext.security import UserMixin
from flask.ext.security import RoleMixin
 
# Setup Flask-Security
user_datastore = SQLAlchemyUserDatastore(db, User, Role)
security = Security(app, user_datastore, 
                    confirm_register_form=ExtendedRegisterForm)

src/a/r/argos-HEAD/argos/web/__init__.py   argos(Download)
from argos.conf import APP
from argos.datastore import db
 
from flask import Flask
from flask.ext.security import SQLAlchemyUserDatastore, Security
    # Setup security.
    from argos.web import models
    user_db = SQLAlchemyUserDatastore(db, models.User, models.Role)
    Security(app, user_db)
 

src/f/l/FlaskPress-HEAD/FlaskPress/models/users.py   FlaskPress(Download)
# -*- coding: utf-8 -*-
from ..tools import generate_password
from ..globals import current_fp
 
from flask.ext.security import Security, SQLAlchemyUserDatastore, UserMixin, RoleMixin
    return None
 
user_datastore = SQLAlchemyUserDatastore(db, User, Role)
security = Security(app, user_datastore)
 

src/f/l/flask-starter-HEAD/starter/__init__.py   flask-starter(Download)
import importlib
 
from flask import Flask, Blueprint
from flask.ext.assets import Bundle, Environment
from flask.ext.security import Security, SQLAlchemyUserDatastore
# Security
from starter.auth.models import User, Role
datastore = SQLAlchemyUserDatastore(db, User, Role)
security = Security(app, datastore)
 

src/f/l/Flask-Security-1.7.1/tests/test_app/sqlalchemy.py   Flask-Security(Download)
 
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.security import Security, UserMixin, RoleMixin, \
     SQLAlchemyUserDatastore
 
        populate_data(app.config.get('USER_COUNT', None))
 
    app.security = Security(app, datastore=SQLAlchemyUserDatastore(db, User, Role), **kwargs)
 
    add_context_processors(app.security)

src/f/l/flask-social-HEAD/tests/test_app/sqlalchemy.py   flask-social(Download)
sys.path.insert(0, os.getcwd())
 
from flask.ext.security import Security, UserMixin, RoleMixin, \
     SQLAlchemyUserDatastore
from flask.ext.social import Social, SQLAlchemyConnectionDatastore
        rank = db.Column(db.Integer)
 
    app.security = Security(app, SQLAlchemyUserDatastore(db, User, Role))
    app.social = Social(app, SQLAlchemyConnectionDatastore(db, Connection))
 

src/t/a/tahoe-1.0.3.1/tests/app/__init__.py   tahoe(Download)
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.security import Security, SQLAlchemyUserDatastore
from flask.ext.mail import Mail
 
        """
        return SQLAlchemyUserDatastore(
            self.db,
            self.models.Account,
            self.models.Role)