diff --git a/practice-app/category/views.py b/practice-app/category/views.py index c979754c..9f5058ed 100644 --- a/practice-app/category/views.py +++ b/practice-app/category/views.py @@ -67,7 +67,6 @@ def getCategories(request): @api_view(['GET', 'POST']) def postCategory(request): - print(request.method) if request.method == 'GET': postForm = categoriesPostForm() return render(request, "createForm_category.html", {"post_form":postForm}) diff --git a/practice-app/rate_article/tests.py b/practice-app/rate_article/tests.py deleted file mode 100644 index 7ce503c2..00000000 --- a/practice-app/rate_article/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/practice-app/rate_article/tests/__init__.py b/practice-app/rate_article/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/practice-app/rate_article/urls.py b/practice-app/rate_article/urls.py index cd8c65ed..bb0dd69c 100644 --- a/practice-app/rate_article/urls.py +++ b/practice-app/rate_article/urls.py @@ -3,7 +3,7 @@ urlpatterns = [ path('', views.indexRateArticle, name='index1'), - path('api/',views.articleVotes.as_view()), + path('api/',views.articleVotes.as_view(), name='api'), path('get/', views.articleVotes.getVoteApis, name="getVoteApis"), path('post/', views.articleVotes.postVoteApis, name="postVoteApis"), ] diff --git a/practice-app/rate_comment/urls.py b/practice-app/rate_comment/urls.py index 6a31a91b..c963a8e4 100644 --- a/practice-app/rate_comment/urls.py +++ b/practice-app/rate_comment/urls.py @@ -3,7 +3,7 @@ urlpatterns = [ path('', views.index, name="Commentindex"), - path('api/', views.CommentRating.as_view()), + path('api/', views.CommentRating.as_view(), name='api'), path('get/', views.CommentRating.getCommentVoteApi, name='getCommentVoteApi'), path('post/', views.CommentRating.postCommentVoteApi, name='postCommentVoteApi') ] \ No newline at end of file diff --git a/practice-app/rate_post/tests.py b/practice-app/rate_post/tests.py deleted file mode 100644 index 7ce503c2..00000000 --- a/practice-app/rate_post/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/practice-app/rate_post/urls.py b/practice-app/rate_post/urls.py index 1eb2718a..60710e9a 100644 --- a/practice-app/rate_post/urls.py +++ b/practice-app/rate_post/urls.py @@ -3,7 +3,7 @@ urlpatterns = [ path('', views.indexRatePost, name='index'), - path('api/',views.postVote.as_view()), + path('api/',views.postVote.as_view(), name='api'), path('get/', views.postVote.getVoteApi, name="getVoteApi"), path('post/', views.postVote.postVoteApi, name="postVoteApi"), ] diff --git a/practice-app/user/tests/test_views.py b/practice-app/user/tests/test_views.py index b3b5dbde..2923f6d0 100644 --- a/practice-app/user/tests/test_views.py +++ b/practice-app/user/tests/test_views.py @@ -139,7 +139,6 @@ def test_poster_POST_email_not_valid(self): self.assertEquals(response.data["error_code"], 6) def test_poster_POST_email_not_valid(self): response = self.client.post(self.userAPI_url,self.email_not_valid_2) - print(response.content) self.assertEquals(response.status_code, 400) self.assertEquals(response.data["error_code"], 7) diff --git a/practice-app/user/views.py b/practice-app/user/views.py index a2850f08..dac8e558 100644 --- a/practice-app/user/views.py +++ b/practice-app/user/views.py @@ -73,7 +73,6 @@ def post(self,req): response = requests.request("GET", url, headers=headers, params=querystring) isValid = response.json()["valid"] explanation = response.json()["text"] - print(response.json()) if(isValid==False or explanation=="Should be blocked"): return Response(data={"message":f"Email domain is not valid! {explanation}!","error_code":7},status=status.HTTP_400_BAD_REQUEST) except: @@ -123,7 +122,6 @@ def allUsers(req): object.append(i["email"]) array.append(object) - print(array) return render(req,"allUsers.html",{'profiles':array}) def createUser(req): @@ -134,8 +132,6 @@ def createUser(req): x = UserList.as_view()(request=req) - #x = requests.post(f"{next}/api", data = data) - print(x) if(x.status_code==201):