20 lines
457 B
Python
20 lines
457 B
Python
"""
|
|
@author p.dolata
|
|
"""
|
|
|
|
from rest_framework.permissions import IsAuthenticated
|
|
from rest_framework.viewsets import ModelViewSet
|
|
|
|
from smartpicasso.app.project.serializers import ProjectSerializer
|
|
|
|
|
|
class ProjectsView(ModelViewSet):
|
|
"""
|
|
View for project endpoints
|
|
"""
|
|
permission_classes = (IsAuthenticated,)
|
|
serializer_class = ProjectSerializer
|
|
|
|
def perform_create(self, serializer):
|
|
serializer.save(user=self.request.user)
|