diff --git a/project/config/settings.py b/project/config/settings.py index 30edc1c..5922d7a 100644 --- a/project/config/settings.py +++ b/project/config/settings.py @@ -26,7 +26,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.environ.get('SECRET_KEY') # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False ALLOWED_HOSTS = ['lemeow125.github.io', 'keannu126.pythonanywhere.com', '127.0.0.1', 'localhost'] diff --git a/project/notes/views.py b/project/notes/views.py index 4b475ff..9dbb0f3 100644 --- a/project/notes/views.py +++ b/project/notes/views.py @@ -5,7 +5,7 @@ from .models import Note class NoteViewSet(viewsets.ModelViewSet): - # permission_classes = [IsAuthenticated] + permission_classes = [IsAuthenticated] serializer_class = NoteSerializer queryset = Note.objects.all() @@ -19,6 +19,5 @@ class NoteViewSet(viewsets.ModelViewSet): class PublicNoteViewSet(generics.ListAPIView): - # permission_classes = [IsAuthenticated] serializer_class = NoteSerializer queryset = Note.objects.filter(public=True)