Exemplo n.º 1
0
import belogging

belogging.load(enable_duplication_filter=True, json=True)
Exemplo n.º 2
0
USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/

STATIC_URL = '/static/'

REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES':
    ('rest_framework_simplejwt.authentication.JWTAuthentication', ),
    'DEFAULT_FILTER_BACKENDS':
    ['django_filters.rest_framework.DjangoFilterBackend'],
}

SIMPLE_JWT = {
    'ACCESS_TOKEN_LIFETIME': timedelta(days=1),
    'AUTH_HEADER_TYPES': ('Bearer', ),
    'ALGORITHM': 'HS256',
    'SIGNING_KEY': SECRET_KEY,
    'VERIFYING_KEY': None,
    'AUDIENCE': None,
    'ISSUER': None,
    'USER_ID_FIELD': 'username',
}

# log
LOG_LEVEL = config("LOG_LEVEL", default="INFO")
belogging.load(json=True)
Exemplo n.º 3
0
import belogging

belogging.load()

ANY_NAME = "Any Name"
Exemplo n.º 4
0
def test_enable_duplication_filter():
    configured = load(enable_duplication_filter=True)
    assert 'logger_duplication' in configured['filters']
Exemplo n.º 5
0
def test_enable_duplication_filter_default():
    configured = load()
    assert 'logger_duplication' not in configured['filters']
Exemplo n.º 6
0
def test_load_log_format():
    configured = load(log_format='%(foobar)s')
    assert configured['formatters']['default']['format'] == '%(foobar)s'