<commit_before>from bluebottle.utils.serializers import DefaultSerializerMixin, ManageSerializerMixin, PreviewSerializerMixin
from django.db.models.query_utils import Q

from rest_framework import generics
from rest_framework.permissions import IsAuthenticated

from bluebottle.utils.model_dispatcher import get_project_model, get_project_phaselog_model
from .models import ProjectTheme, ProjectPhase
from .serializers import (ProjectThemeSerializer, ProjectPhaseSerializer, ProjectPhaseLogSerializer)
from .permissions import IsProjectOwner


PROJECT_MODEL = get_project_model()
PROJECT_PHASELOG_MODEL = get_project_phaselog_model()

class ProjectPreviewList(PreviewSerializerMixin, generics.ListAPIView):
    model = PROJECT_MODEL
    paginate_by = 8
    paginate_by_param = 'page_size'
    max_paginate_by = 100

    def get_queryset(self):
        query = self.request.QUERY_PARAMS
        qs = PROJECT_MODEL.objects.search(query=query)
        return qs.filter(status__viewable=True).all()


class ProjectPreviewDetail(PreviewSerializerMixin, generics.RetrieveAPIView):
    model = PROJECT_MODEL

    def get_queryset(self):
        qs = super(ProjectPreviewDetail, self).get_queryset()<commit_msg>removed hard max paginate limit<commit_after>from bluebottle.utils.serializers import DefaultSerializerMixin, ManageSerializerMixin, PreviewSerializerMixin
from django.db.models.query_utils import Q

from rest_framework import generics
from rest_framework.permissions import IsAuthenticated

from bluebottle.utils.model_dispatcher import get_project_model, get_project_phaselog_model
from .models import ProjectTheme, ProjectPhase
from .serializers import (ProjectThemeSerializer, ProjectPhaseSerializer, ProjectPhaseLogSerializer)
from .permissions import IsProjectOwner


PROJECT_MODEL = get_project_model()
PROJECT_PHASELOG_MODEL = get_project_phaselog_model()

class ProjectPreviewList(PreviewSerializerMixin, generics.ListAPIView):
    model = PROJECT_MODEL
    paginate_by = 8
    paginate_by_param = 'page_size'

    def get_queryset(self):
        query = self.request.QUERY_PARAMS
        qs = PROJECT_MODEL.objects.search(query=query)
        return qs.filter(status__viewable=True).all()


class ProjectPreviewDetail(PreviewSerializerMixin, generics.RetrieveAPIView):
    model = PROJECT_MODEL

    def get_queryset(self):
        qs = super(ProjectPreviewDetail, self).get_queryset()
{'fraction_non_alphanumeric': 0.061301084236864055, 'fraction_numerical': 0.002085070892410342, 'mean_word_length': 6.1398809523809526, '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': '5807787', 'n_tokens_mistral': 709, 'n_tokens_neox': 698, 'n_words': 143}