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

All Samples(8)  |  Call(0)  |  Derive(4)  |  Import(4)

src/p/y/python-stdnet-0.8.2/stdnet/odm/related.py   python-stdnet(Download)
from stdnet import QuerySetError, ManyToManyError
 
from .session import Manager, LazyProxy
 
__all__ = ['LazyForeignKey', 'ModelFieldPickler']
class LazyForeignKey(LazyProxy):
    '''Descriptor for a :class:`ForeignKey` field.'''
    def load(self, instance, session=None, backend=None):
        return instance._load_related_model(self.field)
 

src/p/y/python-stdnet-HEAD/stdnet/odm/related.py   python-stdnet(Download)
 
from .globals import Event
from .session import Manager, LazyProxy
 
__all__ = ['LazyForeignKey', 'ModelFieldPickler']
class LazyForeignKey(LazyProxy):
    '''Descriptor for a :class:`ForeignKey` field.'''
    def load(self, instance, session=None, backend=None):
        return instance._load_related_model(self.field)
 

src/p/y/python-stdnet-0.8.2/stdnet/odm/structfields.py   python-stdnet(Download)
from .struct import *
from .fields import Field
from .session import LazyProxy
from . import related
 
class StructureFieldProxy(LazyProxy):
    '''A descriptor for a :class:`StructureField`.'''
    def __init__(self, field, factory):
        super(StructureFieldProxy, self).__init__(field)
        self.factory = factory

src/p/y/python-stdnet-HEAD/stdnet/odm/structfields.py   python-stdnet(Download)
from .struct import *
from .fields import Field
from .session import LazyProxy
from . import related
 
class StructureFieldProxy(LazyProxy):
    '''A descriptor for a :class:`StructureField`.'''
    def __init__(self, field, factory):
        super(StructureFieldProxy, self).__init__(field)
        self.factory = factory