diff --git a/api/views.py b/api/views.py index 894ea08..7fb05c9 100644 --- a/api/views.py +++ b/api/views.py @@ -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] @@ -78,7 +77,6 @@ class CurationDetail( mixins.UpdateModelMixin, generics.GenericAPIView, ): - queryset = models.Curation.objects.all() serializer_class = serializers.CurationSerializer @@ -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] @@ -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] @@ -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] @@ -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] diff --git a/curations/migrations/0001_initial.py b/curations/migrations/0001_initial.py index 04d181d..744e97b 100644 --- a/curations/migrations/0001_initial.py +++ b/curations/migrations/0001_initial.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/curations/models.py b/curations/models.py index 295ffc4..8945ef1 100644 --- a/curations/models.py +++ b/curations/models.py @@ -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) diff --git a/curatorbackendapi/views.py b/curatorbackendapi/views.py index 3a2d523..06dbe1a 100644 --- a/curatorbackendapi/views.py +++ b/curatorbackendapi/views.py @@ -10,7 +10,6 @@ class HomePageView(View): - template_name = "pages/home.html" def get(self, request): @@ -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] @@ -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(): @@ -93,5 +89,4 @@ def signUp(request): def add_curation_view(request): - return render(request, "pages/curation_add.html") diff --git a/userProfiles/views.py b/userProfiles/views.py index 2e4331a..7367f23 100644 --- a/userProfiles/views.py +++ b/userProfiles/views.py @@ -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():