<commit_before>from django.contrib.auth.models import User
from django.http import Http404

from rest_framework import mixins
from rest_framework import generics
from rest_framework import viewsets

from api.serializers import UserSerializer, TodoListSerializer
from lists.models import TodoList


class UserViewSet(viewsets.ModelViewSet):
    """API endpoint that allows users to be viewed or edited."""
    queryset = User.objects.all()
    serializer_class = UserSerializer


class TodoLists(generics.ListCreateAPIView):

    queryset = TodoList.objects.all()
    serializer_class = TodoListSerializer

class TodoListDetail(generics.RetrieveUpdateDestroyAPIView):

    queryset = TodoList.objects.all()
    serializer_class = TodoListSerializer<commit_msg>Switched user view to ListAPIView.<commit_after>from django.contrib.auth.models import User
from django.http import Http404

from rest_framework import mixins
from rest_framework import generics
from rest_framework import viewsets

from api.serializers import UserSerializer, TodoListSerializer
from lists.models import TodoList


class UserList(generics.ListAPIView):
    queryset = User.objects.all()
    serializer_class = UserSerializer


class UserDetail(generics.RetrieveAPIView):
    queryset = User.objects.all()
    serializer_class = UserSerializer


class TodoLists(generics.ListCreateAPIView):

    queryset = TodoList.objects.all()
    serializer_class = TodoListSerializer

    def perform_create(self, serializer):
        serializer.save(creator=self.request.user)

class TodoListDetail(generics.RetrieveUpdateDestroyAPIView):

    queryset = TodoList.objects.all()
    serializer_class = TodoListSerializer
{'fraction_non_alphanumeric': 0.06420927467300833, 'fraction_numerical': 0.0035671819262782403, 'mean_word_length': 5.423664122137405, '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': '6832565', 'n_tokens_mistral': 479, 'n_tokens_neox': 462, 'n_words': 117}