Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8395376
common.py
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
common.py
View Options
# Copyright (C) 2017-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
"""
Django settings for swh project.
Generated by 'django-admin startproject' using Django 1.10.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import
os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
ALLOWED_HOSTS
=
[
"127.0.0.1"
,
"localhost"
]
# Application definition
INSTALLED_APPS
=
[
"django.contrib.auth"
,
"django.contrib.contenttypes"
,
"django.contrib.staticfiles"
,
"django.contrib.sessions"
,
"django.contrib.messages"
,
"django.contrib.postgres"
,
# for JSONField, ArrayField
"swh.deposit.apps.DepositConfig"
,
]
MIDDLEWARE
=
[
"django.middleware.security.SecurityMiddleware"
,
"django.contrib.sessions.middleware.SessionMiddleware"
,
"django.middleware.common.CommonMiddleware"
,
"django.middleware.csrf.CsrfViewMiddleware"
,
"django.contrib.auth.middleware.AuthenticationMiddleware"
,
"django.contrib.messages.middleware.MessageMiddleware"
,
"django.middleware.clickjacking.XFrameOptionsMiddleware"
,
"swh.deposit.auth.WrapBasicAuthenticationResponseMiddleware"
,
]
ROOT_URLCONF
=
"swh.deposit.urls"
TEMPLATES
=
[
{
"BACKEND"
:
"django.template.backends.django.DjangoTemplates"
,
"DIRS"
:
[],
"APP_DIRS"
:
True
,
"OPTIONS"
:
{
"context_processors"
:
[
"django.template.context_processors.debug"
,
"django.template.context_processors.request"
,
"django.contrib.auth.context_processors.auth"
,
"django.contrib.messages.context_processors.messages"
,
],
},
},
]
# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS
=
[
{
"NAME"
:
"django.contrib.auth.password_validation.UserAttributeSimilarityValidator"
,
# noqa
},
{
"NAME"
:
"django.contrib.auth.password_validation.MinimumLengthValidator"
,},
{
"NAME"
:
"django.contrib.auth.password_validation.CommonPasswordValidator"
,},
{
"NAME"
:
"django.contrib.auth.password_validation.NumericPasswordValidator"
,},
]
# Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/
LANGUAGE_CODE
=
"en-us"
TIME_ZONE
=
"UTC"
USE_I18N
=
True
USE_L10N
=
True
USE_TZ
=
True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/
STATIC_URL
=
"/static/"
REST_FRAMEWORK
=
{
"DEFAULT_AUTHENTICATION_CLASSES"
:
(
"rest_framework.authentication.BasicAuthentication"
,
),
"EXCEPTION_HANDLER"
:
"swh.deposit.exception.custom_exception_handler"
,
}
FILE_UPLOAD_HANDLERS
=
[
"django.core.files.uploadhandler.MemoryFileUploadHandler"
,
"django.core.files.uploadhandler.TemporaryFileUploadHandler"
,
]
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 7:38 PM (10 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3365819
Attached To
rDDEP Push deposit
Event Timeline
Log In to Comment