Пример #1
0
 class Meta:
     queryset = Quiz.objects()
     allowed_methods = ('get', )
     authentication = UserAuthentication()
     authorization = Authorization()
     excludes = ('resource_uri', )
     ordering = ('created_at', )
Пример #2
0
 class Meta:
     queryset = FavoriteCategory.objects()
     allowed_methods = ('get', 'post')
     detail_allowed_methods = ('get', )
     authentication = UserAuthentication()
     excludes = ('resource_uri', )
     filtering = {'user': ALL}
Пример #3
0
 class Meta:
     queryset = Mark.objects(is_online=True)
     allowed_methods = ('get', 'post')
     authentication = UserAuthentication()
     authorization = Authorization()
     excludes = ('resource_uri', )
     filtering = {'user': ALL, 'period': ALL}
     ordering = ('created_at', 'period')
Пример #4
0
 class Meta:
     queryset = Paper.objects(is_online=True)
     allowed_methods = ('get', )
     authentication = UserAuthentication()
     authorization = Authorization()
     excludes = ('resource_uri', )
     filtering = {'period': ALL}
     ordering = ('period', )
Пример #5
0
 class Meta:
     queryset = User.objects()
     allowed_methods = ('get', )
     detail_allowed_methods = ('get', 'post')
     authentication = UserAuthentication()
     authorization = Authorization()
     always_return_data = True
     fields = [
         'id', 'username', 'email', 'screen_name', 'phone', 'device',
         'accounts', 'is_active', 'last_login', 'date_joined'
     ]
     ordering = ('username', 'last_login', 'date_joined')
Пример #6
0
 class Meta:
     queryset = Lottery.objects(is_online=True)
     allowed_methods = ('get', )
     authentication = UserAuthentication()
     authorization = Authorization()
     filtering = {'period': ALL}
Пример #7
0
 class Meta:
     queryset = Product.objects()
     allowed_methods = ('get', )
     authentication = UserAuthentication()
     authorization = Authorization()
     excludes = ('resource_uri', )