コード例 #1
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = PoliticalView.objects.all()
     fields = ['user', 'political_index', 'id']
     always_return_data = True
     resource_name = 'political_view'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #2
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = OnBoardingFlow.objects.all()
     resource_name = 'onboardingflow'
     fields = ['is_complete']
     always_return_data = True
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #3
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = FacebookPhoto.objects.all()
     resource_name = 'photo'
     ordering = ['order']
     always_return_data = True
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #4
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = Offer.objects.all()
     fields = ['user', 'offer', 'id']
     resource_name = 'offer'
     always_return_data = True
     validation = OfferValidation()
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #5
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = Goal.objects.all()
     fields = ['user', 'goal', 'id']
     always_return_data = True
     resource_name = 'goal'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
     validation = GoalValidation()
コード例 #6
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = FacebookLike.objects.all()
     fields = ['id', 'name', 'facebook_id', 'picture', 'fan_count',
               'created_time']
     list_allowed_methods = ['get']
     resource_name = 'other_likes'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #7
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = Friend.objects.all()
     resource_name = 'friends'
     always_return_data = True
     fields = ['id', 'friend1', 'friend2', 'status', 'updated_at']
     filtering = {'friend1': ALL, 'friend2': ALL, 'status': ALL}
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #8
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = Message.objects.all()
     resource_name = 'messages'
     allowed_methods = ['get', 'post']
     ordering = ['sent_at']
     always_return_data = True
     fields = ['sender', 'recipient', 'body', 'sent_at']
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #9
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = ChatMessage.objects.all()
     resource_name = 'chat'
     allowed_methods = ['get', 'post']
     always_return_data = True
     fields = ['sender', 'body', 'sent_at']
     filtering = {'event': ALL_WITH_RELATIONS}
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #10
0
ファイル: resources.py プロジェクト: Persice/persice.com
    class Meta:
        always_return_data = True
        queryset = InterestSubject.objects.order_by('description')
        resource_name = 'interest_subject'
        fields = ['description']

        filtering = {'description': ALL}
        authentication = JSONWebTokenAuthentication()
        authorization = Authorization()
コード例 #11
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = FacebookCustomUserActive.objects.all()
     resource_name = 'me'
     fields = ['id', 'first_name', 'last_name', 'facebook_id', 'image']
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
     filtering = {
         'first_name': ALL
     }
コード例 #12
0
ファイル: resources.py プロジェクト: Persice/persice.com
    class Meta:
        always_return_data = True
        queryset = PoliticalIndex.objects.order_by('name')
        resource_name = 'political_index'
        fields = ['name']

        filtering = {'name': ALL}
        authentication = JSONWebTokenAuthentication()
        authorization = Authorization()
コード例 #13
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     queryset = FacebookCustomUserActive.objects.all()
     resource_name = 'auth/user'
     fields = [
         'username', 'first_name', 'last_name', 'last_login', 'about_me',
         'facebook_id', 'id', 'date_of_birth', 'facebook_profile_url',
         'gender', 'image', 'email', 'date_joined'
     ]
     filtering = {'facebook_id': ALL}
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #14
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     resource_name = 'attendees'
     queryset = Membership.objects.all()
     list_allowed_methods = ['get']
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
     filtering = {
         'rsvp': ALL,
         'event': ALL,
         'is_organizer': ALL,
         'user': ALL_WITH_RELATIONS
     }
コード例 #15
0
ファイル: resources.py プロジェクト: Persice/persice.com
    class Meta:
        always_return_data = True
        queryset = Subject.objects.all()
        resource_name = 'subject'
        fields = ['description']

        filtering = {
            'description': ALL
        }
        limit = 30
        max_limit = limit
        authentication = JSONWebTokenAuthentication()
        authorization = Authorization()
コード例 #16
0
ファイル: resources.py プロジェクト: Persice/persice.com
    class Meta:
        always_return_data = True
        queryset = Event.objects.all().order_by('-starts_on')
        resource_name = 'event'
        excludes = ['search_index']

        filtering = {
            'description': ALL
        }
        validation = EventValidation()
        authentication = JSONWebTokenAuthentication()
        authorization = GuardianAuthorization(
            view_permission_code='view_event'
        )
コード例 #17
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     always_return_data = True
     queryset = FilterState.objects.all()
     resource_name = 'filter/state2'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #18
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     resource_name = 'organizer'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
     allowed_methods = ['get']
コード例 #19
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     # max_limit = 10
     resource_name = 'matchfeed'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #20
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     resource_name = 'profile'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #21
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     resource_name = 'mutual-connections'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #22
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     max_limit = 1
     resource_name = 'mutual/friends'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #23
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     resource_name = 'events2'
     list_allowed_methods = ['get']
     authentication = JSONWebTokenAuthentication()
     authorization = GuardianAuthorization()
コード例 #24
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     always_return_data = True
     queryset = Membership.objects.all()
     resource_name = 'member'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #25
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     resource_name = 'events/connections'
     object_class = ResourseObject
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #26
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     resource_name = 'mutual-friends/count'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #27
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     # max_limit = 10
     resource_name = 'attendees'
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #28
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     resource_name = 'friends'
     object_class = NeoObject
     always_return_data = True
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #29
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     resource_name = 'shared_interests'
     list_allowed_methods = ['get']
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
コード例 #30
0
ファイル: resources.py プロジェクト: Persice/persice.com
 class Meta:
     resource_name = 'accounts/linkedin/disconnect'
     always_return_data = True
     authentication = JSONWebTokenAuthentication()
     authorization = Authorization()
     allowed_methods = ['post']