Skip to content

Commit

Permalink
🎨 Format Python code with psf/black
Browse files Browse the repository at this point in the history
  • Loading branch information
carrycooldude committed Mar 31, 2023
1 parent adbdc5a commit d6f3b34
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 13 deletions.
6 changes: 0 additions & 6 deletions api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def retrieve(self, request, *args, **kwargs):
class CurationList(
mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericAPIView
):

queryset = models.Curation.objects.all()
serializer_class = serializers.CurationSerializer
permission_classes = [permissions.IsAuthenticatedOrReadOnly, IsCurationOwner]
Expand Down Expand Up @@ -78,7 +77,6 @@ class CurationDetail(
mixins.UpdateModelMixin,
generics.GenericAPIView,
):

queryset = models.Curation.objects.all()
serializer_class = serializers.CurationSerializer

Expand All @@ -95,7 +93,6 @@ def delete(self, request, *args, **kwargs):


class TopicCreate(mixins.CreateModelMixin, generics.GenericAPIView):

queryset = models.Topic.objects.all()
serializer_class = serializers.TopicSerializer
permission_classes = [permissions.IsAuthenticatedOrReadOnly, IsTopicOwner]
Expand All @@ -119,7 +116,6 @@ def put(self, request, *args, **kwargs):


class LinkCreate(mixins.CreateModelMixin, generics.GenericAPIView):

queryset = models.Link.objects.all()
serializer_class = serializers.LinkSerializer
permission_classes = [permissions.IsAuthenticatedOrReadOnly, IsLinkOwner]
Expand All @@ -143,7 +139,6 @@ def put(self, request, *args, **kwargs):


class SubTopicCreate(mixins.CreateModelMixin, generics.GenericAPIView):

queryset = models.SubTopic.objects.all()
serializer_class = serializers.SubTopicSerializer
permission_classes = [permissions.IsAuthenticatedOrReadOnly, IsSubTopicOwner]
Expand All @@ -167,7 +162,6 @@ def put(self, request, *args, **kwargs):


class SubTopicLinkCreate(mixins.CreateModelMixin, generics.GenericAPIView):

queryset = models.SubTopicLink.objects.all()
serializer_class = serializers.SubTopicLinkSerializer
permission_classes = [permissions.IsAuthenticatedOrReadOnly, IsSubTopicLinkOwner]
Expand Down
1 change: 0 additions & 1 deletion curations/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
1 change: 1 addition & 0 deletions curations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from django.db import models
from django.contrib.auth import get_user, get_user_model


# Create your models here.
class Curation(models.Model):
title = models.CharField(max_length=64)
Expand Down
5 changes: 0 additions & 5 deletions curatorbackendapi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class HomePageView(View):

template_name = "pages/home.html"

def get(self, request):
Expand All @@ -36,11 +35,9 @@ class SubjectListView(ListView):


class SubjectPageView(View):

template_name = "pages/subjects.html"

def get(self, request, *args, **kwargs):

# defining vars
title = kwargs["sub"]
subject = Subject.objects.filter(title=title)[0]
Expand Down Expand Up @@ -72,7 +69,6 @@ def get(self, request, *args, **kwargs):


def signUp(request):

if request.method == "POST":
form = CustomUserCreationForm(request.POST)
if form.is_valid():
Expand All @@ -93,5 +89,4 @@ def signUp(request):


def add_curation_view(request):

return render(request, "pages/curation_add.html")
1 change: 0 additions & 1 deletion userProfiles/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def get(self, request, *args, **kwargs):
return render(request, "userProfiles/profile.html", context)

def post(self, request, *args, **kwargs):

user_form = CustomUserUpdateForm(request.POST, instance=request.user)

if user_form.is_valid():
Expand Down

0 comments on commit d6f3b34

Please sign in to comment.