Skip to content

Commit

Permalink
Commented out Authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaBansal2310 committed Mar 15, 2024
1 parent f820b1e commit 0a33dec
Show file tree
Hide file tree
Showing 27 changed files with 11 additions and 11 deletions.
Binary file modified Painting/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file modified Painting/__pycache__/settings.cpython-311.pyc
Binary file not shown.
Binary file modified Painting/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file modified Painting/__pycache__/wsgi.cpython-311.pyc
Binary file not shown.
6 changes: 3 additions & 3 deletions Painting/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.TokenAuthentication',
],
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticated',
],
# 'DEFAULT_PERMISSION_CLASSES': [
# 'rest_framework.permissions.IsAuthenticated',
# ],
}


Expand Down
Binary file modified PaintingApp/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file modified PaintingApp/__pycache__/admin.cpython-311.pyc
Binary file not shown.
Binary file modified PaintingApp/__pycache__/apps.cpython-311.pyc
Binary file not shown.
Binary file modified PaintingApp/__pycache__/models.cpython-311.pyc
Binary file not shown.
Binary file modified PaintingApp/__pycache__/serializers.cpython-311.pyc
Binary file not shown.
Binary file modified PaintingApp/__pycache__/views.cpython-311.pyc
Binary file not shown.
Binary file modified PaintingApp/migrations/__pycache__/0001_initial.cpython-311.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified PaintingApp/migrations/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
12 changes: 6 additions & 6 deletions PaintingApp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class Painting(models.Model):
Price = models.IntegerField()
image = models.FileField(upload_to='paintings/', null=True, blank=True)

class Meta:
permissions = (
("can_create_painting", "Can create painting"),
("can_edit_painting", "Can edit painting"),
("can_delete_painting", "Can delete painting"),
)
# class Meta:
# permissions = (
# ("can_create_painting", "Can create painting"),
# ("can_edit_painting", "Can edit painting"),
# ("can_delete_painting", "Can delete painting"),
# )
4 changes: 2 additions & 2 deletions PaintingApp/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

class PaintingApiView(APIView):
permission_classes = (IsAuthenticated,)
queryset = Painting.objects.all() # Added .queryset attribute
permission_classes = [DjangoModelPermissions] # Using DjangoModelPermissions
# queryset = Painting.objects.all() # Added .queryset attribute
# permission_classes = [DjangoModelPermissions] # Using DjangoModelPermissions

def get(self, request, painting_ID=None):
if painting_ID:
Expand Down
Binary file modified accounts/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/admin.cpython-311.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/apps.cpython-311.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/models.cpython-311.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/serializers.cpython-311.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/urls.cpython-311.pyc
Binary file not shown.
Binary file modified accounts/__pycache__/views.cpython-311.pyc
Binary file not shown.
Binary file modified accounts/migrations/__pycache__/0001_initial.cpython-311.pyc
Binary file not shown.
Binary file modified accounts/migrations/__pycache__/__init__.cpython-311.pyc
Binary file not shown.

0 comments on commit 0a33dec

Please sign in to comment.