Did I find the right examples for you? yes no

All Samples(7)  |  Call(3)  |  Derive(0)  |  Import(4)

src/t/o/tornado-bootstrap-HEAD/src/handlers/entity.py   tornado-bootstrap(Download)
"""
 
from models.entity import entity
from handlers import request_handler
 
    def post(self):
        self.repository.save(entity(self.param('field1'), self.param('field2')))
        self.render('entity/index.html', data=self.repository.list())
 
class entity_handler(request_handler):

src/t/o/tornado-bootstrap-HEAD/src/config/schema.py   tornado-bootstrap(Download)
from sqlalchemy import Table, Column, Integer, String, MetaData
from sqlalchemy.orm import mapper
from models.entity import entity
 
def map_entities():

src/t/o/tornado-bootstrap-HEAD/test/unit/models/entity_spec.py   tornado-bootstrap(Download)
# Copyright (c) 2010 Pedro Matiello <pmatiello@gmail.com>
 
from mockito import any, mock, verify, when
from models.entity import entity, entity_repository
from config.schema import map_entities
    def setup(self):
        self.session = mock()
        self.repository = entity_repository(self.session)
        self.msg = entity("Field1 data", "Field1 data")
 

src/t/o/tornado-bootstrap-HEAD/test/unit/handlers/entity_spec.py   tornado-bootstrap(Download)
# Copyright (c) 2010 Pedro Matiello <pmatiello@gmail.com>
 
from mockito import any, mock, verify, when
from handlers.entity import entity_handler, entities_handler
from models.entity import entity
    def setup(self):
        self.handler = object.__new__(entity_handler)
        self.repository = mock()
        self.handler.initialize(self.repository)
        self.entity = entity("Field1 data", "Field2 data")