Esempio n. 1
0
 def __new__(cls, name, bases, attrs):
     defaultMeta = type('Meta', (), dict(
         include_resource_uri=False,
         always_return_data=True,
         paginator_class=DojoPaginator,
         authentication=APIAuthentication,
         authorization=APIAuthorization(),
     ))
     meta = attrs.get('Meta', None)
     if not meta:
         meta = type('Meta')
     attrs['Meta'] = type('Meta', (meta, defaultMeta), {})
     return DeclarativeMetaclass.__new__(cls, name, bases, attrs)
Esempio n. 2
0
 def __new__(cls, name, bases, attrs):
     defaultMeta = type('Meta', (), dict(
         include_resource_uri=False,
         always_return_data=True,
         paginator_class=DojoPaginator,
         authentication=APIAuthentication,
         authorization=APIAuthorization(),
     ))
     meta = attrs.get('Meta', None)
     if not meta:
         meta = type('Meta')
     attrs['Meta'] = type('Meta', (meta, defaultMeta), {})
     return DeclarativeMetaclass.__new__(cls, name, bases, attrs)