mirror of
https://github.com/lemeow125/Django-NotesApp.git
synced 2024-11-17 06:29:25 +08:00
Switch to production to prepare for deployment and merge to master
This commit is contained in:
parent
390040d460
commit
0e02573e9f
2 changed files with 2 additions and 3 deletions
|
@ -26,7 +26,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = os.environ.get('SECRET_KEY')
|
SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = False
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['lemeow125.github.io',
|
ALLOWED_HOSTS = ['lemeow125.github.io',
|
||||||
'keannu126.pythonanywhere.com', '127.0.0.1', 'localhost']
|
'keannu126.pythonanywhere.com', '127.0.0.1', 'localhost']
|
||||||
|
|
|
@ -5,7 +5,7 @@ from .models import Note
|
||||||
|
|
||||||
|
|
||||||
class NoteViewSet(viewsets.ModelViewSet):
|
class NoteViewSet(viewsets.ModelViewSet):
|
||||||
# permission_classes = [IsAuthenticated]
|
permission_classes = [IsAuthenticated]
|
||||||
serializer_class = NoteSerializer
|
serializer_class = NoteSerializer
|
||||||
queryset = Note.objects.all()
|
queryset = Note.objects.all()
|
||||||
|
|
||||||
|
@ -19,6 +19,5 @@ class NoteViewSet(viewsets.ModelViewSet):
|
||||||
|
|
||||||
|
|
||||||
class PublicNoteViewSet(generics.ListAPIView):
|
class PublicNoteViewSet(generics.ListAPIView):
|
||||||
# permission_classes = [IsAuthenticated]
|
|
||||||
serializer_class = NoteSerializer
|
serializer_class = NoteSerializer
|
||||||
queryset = Note.objects.filter(public=True)
|
queryset = Note.objects.filter(public=True)
|
||||||
|
|
Loading…
Reference in a new issue