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

All Samples(12)  |  Call(3)  |  Derive(0)  |  Import(9)

src/m/e/mediadrop-HEAD/mediadrop/model/tests/user_example_test.py   mediadrop(Download)
from datetime import datetime, timedelta
 
from mediadrop.model import User
from mediadrop.lib.test.db_testcase import DBTestCase
from mediadrop.lib.test.pythonic_testcase import *

src/m/e/mediadrop-HEAD/mediadrop/websetup.py   mediadrop(Download)
from mediadrop.plugin import events
 
from mediadrop.model import (Author, AuthorWithIP, Category, Comment,
    DBSession, Group, Media, MediaFile, Permission, Podcast, Setting,
    User, metadata, cleanup_players_table)
        DBSession.add(s)
 
    admin_user = User()
    admin_user.user_name = u'admin'
    admin_user.display_name = u'Admin'

src/m/e/mediadrop-HEAD/mediadrop/lib/auth/permission_system.py   mediadrop(Download)
from mediadrop.lib.auth.api import PermissionSystem, UserPermissions
from mediadrop.lib.auth.query_result_proxy import QueryResultProxy, StaticQuery
from mediadrop.model import DBSession, Group, User
from mediadrop.plugin.abc import AbstractClass, abstractmethod
 
    def permissions_for_user(cls, user, config):
        if user is None:
            user = User()
            user.display_name = u'Anonymous User'
            user.user_name = u'anonymous'

src/m/e/mediadrop-HEAD/mediadrop/controllers/admin/users.py   mediadrop(Download)
    observable, paginate, validate)
from mediadrop.lib.helpers import redirect, url_for
from mediadrop.model import Group, User, fetch_row
from mediadrop.model.meta import DBSession
from mediadrop.plugin import events

src/m/e/mediadrop-HEAD/mediadrop/lib/auth/middleware.py   mediadrop(Download)
    def by_attribute(cls, attribute_name=None):
        from mediadrop.model import DBSession, User
        authenticator = MediaDropAuthenticatorPlugin(User, DBSession)
        if attribute_name:
            authenticator.translations['user_name'] = attribute_name

src/m/e/mediadrop-HEAD/mediadrop/lib/tests/request_mixin_test.py   mediadrop(Download)
from mediadrop.lib.test.pythonic_testcase import *
from mediadrop.lib.test import build_http_body, RequestMixin
from mediadrop.model import DBSession, User
 
 

src/m/e/mediadrop-HEAD/mediadrop/lib/auth/tests/group_based_permissions_policy_test.py   mediadrop(Download)
from mediadrop.lib.test.pythonic_testcase import *
from mediadrop.lib.test.db_testcase import DBTestCase
from mediadrop.model import DBSession, Media, Permission, User
 
 

src/m/e/mediadrop-HEAD/mediadrop/lib/auth/tests/filtering_restricted_items_test.py   mediadrop(Download)
from mediadrop.lib.test.db_testcase import DBTestCase
from mediadrop.lib.test.pythonic_testcase import *
from mediadrop.model import DBSession, Media, User
 
 
    def _create_user_without_groups(self):
        user = User()
        user.user_name = u'joe'
        user.email_address = u'joe@mediadrop.example'
        user.display_name = u'Joe'

src/m/e/mediadrop-HEAD/mediadrop/controllers/tests/login_test.py   mediadrop(Download)
from mediadrop.lib.test import ControllerTestCase
from mediadrop.lib.test.pythonic_testcase import *
from mediadrop.model import DBSession, Group, User, Permission