示例#1
0
 class Meta:
     queryset = User.objects.all()
     resource_name = 'user'
     fields = ['first_name', 'last_name', 'last_login', 'username', 'points', 'badges']
     allowed_methods = ['post']
     authentication = Authentication()
     authorization = Authorization()
     serializer = UserJSONSerializer()
     always_return_data = True
 class Meta:
     queryset = User.objects.all()
     resource_name = 'profileupdate'
     allowed_methods = ['post']
     fields = ['first_name', 'last_name', 'email']
     authentication = ApiKeyAuthentication()
     authorization = Authorization()
     serializer = UserJSONSerializer()
     always_return_data = True
     include_resource_uri = False