コード例 #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       
コード例 #2
0
 class Meta:
     queryset = User.objects.all()
     resource_name = 'user'
     fields = [
         'first_name', 'last_name', 'email', 'last_login', 'username',
         'points', 'badges', 'survey_status', 'school_code', 'status',
         'year_group', 'program', 'home_town', 'imei'
     ]
     allowed_methods = ['post']
     authentication = Authentication()
     authorization = Authorization()
     serializer = UserJSONSerializer()
     always_return_data = True