<commit_before>from agora_site.agora_core.models import Agora
from agora_site.misc.generic_resource import GenericResource, GenericMeta
from agora_site.agora_core.resources.user import UserResource

from tastypie import fields


class AgoraResource(GenericResource):
    creator = fields.ForeignKey(UserResource, 'creator')

    class Meta:

        queryset = Agora.objects.all()
        #authentication = SessionAuthentication()
        list_allowed_methods = ['get', 'post']
        detail_allowed_methods = ['get']<commit_msg>API: added members and admins to agora resource<commit_after>from agora_site.agora_core.models import Agora
from agora_site.misc.generic_resource import GenericResource, GenericMeta
from agora_site.agora_core.resources.user import UserResource

from tastypie import fields


class AgoraResource(GenericResource):
    creator = fields.ForeignKey(UserResource, 'creator')
    members = fields.ManyToManyField(UserResource, 'members')
    admins = fields.ManyToManyField(UserResource, 'admins')

    class Meta:

        queryset = Agora.objects.all()
        #authentication = SessionAuthentication()
        list_allowed_methods = ['get', 'post']
        detail_allowed_methods = ['get']

    class Meta:

        queryset = Agora.objects.all()
        #authentication = SessionAuthentication()
        list_allowed_methods = ['get', 'post']
        detail_allowed_methods = ['get']
{'fraction_non_alphanumeric': 0.0892983699503898, 'fraction_numerical': 0.0, 'mean_word_length': 4.3283018867924525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3299214', 'n_tokens_mistral': 397, 'n_tokens_neox': 387, 'n_words': 89}