From 0f1d662d251fdb919d744358c4cc15c0fadf453e Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 11 Mar 2020 00:47:43 +0100 Subject: [PATCH] Anonymous users don't have any access to the API (fix it later with rights...), fix CI --- apps/note/tables.py | 2 +- note_kfet/settings/__init__.py | 4 ++-- note_kfet/settings/base.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/note/tables.py b/apps/note/tables.py index e85fcbae..d26ffedc 100644 --- a/apps/note/tables.py +++ b/apps/note/tables.py @@ -6,7 +6,7 @@ from django.db.models import F from django_tables2.utils import A from .models.notes import Alias -from .models.transactions import Transaction, TransactionTemplate +from .models.transactions import Transaction from .templatetags.pretty_money import pretty_money diff --git a/note_kfet/settings/__init__.py b/note_kfet/settings/__init__.py index b370a430..ce31b39f 100644 --- a/note_kfet/settings/__init__.py +++ b/note_kfet/settings/__init__.py @@ -79,5 +79,5 @@ if "logs" in INSTALLED_APPS: MIDDLEWARE += ('logs.middlewares.LogsMiddleware',) if "debug_toolbar" in INSTALLED_APPS: - MIDDLEWARE.insert(1,"debug_toolbar.middleware.DebugToolbarMiddleware") - INTERNAL_IPS = [ '127.0.0.1'] + MIDDLEWARE.insert(1, "debug_toolbar.middleware.DebugToolbarMiddleware") + INTERNAL_IPS = ['127.0.0.1'] diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index 3a5c3200..737350e2 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -137,7 +137,7 @@ REST_FRAMEWORK = { # or allow read-only access for unauthenticated users. 'DEFAULT_PERMISSION_CLASSES': [ # TODO Maybe replace it with our custom permissions system - 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' + 'rest_framework.permissions.DjangoModelPermissions' ], 'DEFAULT_AUTHENTICATION_CLASSES': [ 'rest_framework.authentication.TokenAuthentication',