Did I find the right examples for you? yes no

All Samples(11)  |  Call(9)  |  Derive(0)  |  Import(2)

src/l/a/labmanager-HEAD/labmanager/sample_data.py   labmanager(Download)
 
from .db import db_session, init_db
from .models import LtUser, PermissionToLt, Laboratory, PermissionToLtUser
from .models import LearningTool, RLMS, PermissionToCourse, BasicHttpCredentials, ShindigCredentials, Course
 
    password = unicode(hashlib.new('sha', 'password').hexdigest())
 
    lt_admin      = LtUser(login="admin", full_name="Administrator", lt = lt1, access_level = 'admin')
    lt_admin.password = password
    lt_instructor1 = LtUser(login="instructor1", full_name="Instructor 1", lt = lt1, access_level = 'instructor')
    lt_instructor1.password = password
    lt_instructor2 = LtUser(login="instructor2", full_name="Instructor 2", lt = lt1, access_level = 'instructor')
    db_session.add(lt2)
 
    lt_admin2   = LtUser(login="admin", full_name="Administrator", lt = lt2, access_level = 'admin')
    lt_admin2.password = password
    lt_instructor1b = LtUser(login="instructor1", full_name="Instructor 1 (at B)", lt = lt2, access_level = 'instructor')

src/l/a/labmanager-HEAD/labmanager/views/authn.py   labmanager(Download)
from labmanager.babel import gettext
from ..application import app
from ..models import LabManagerUser, LtUser, LearningTool
 
login_manager = LoginManager()