mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
django: Changes for new import path
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
f192171e43
commit
3587f49703
@ -8,7 +8,7 @@ from django.db import migrations, models
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('plinth', '0001_initial'),
|
||||
('freedombox', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
||||
@ -59,7 +59,7 @@ def merge_firstboot_finished_fields(apps, schema_editor):
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('plinth', '0002_modulestore'),
|
||||
('freedombox', '0002_modulestore'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
||||
@ -24,7 +24,7 @@ def truncate_user_profile(apps, schema_editor):
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('plinth', '0003_merge_firstboot_completed_fields'),
|
||||
('freedombox', '0003_merge_firstboot_completed_fields'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
||||
@ -15,7 +15,7 @@ from freedombox.models import JSONField
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('plinth', '0004_userprofile'),
|
||||
('freedombox', '0004_userprofile'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
||||
@ -16,7 +16,7 @@ class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('plinth', '0005_storednotification'),
|
||||
('freedombox', '0005_storednotification'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
||||
@ -127,7 +127,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.sessions',
|
||||
'oauth2_provider',
|
||||
'stronghold',
|
||||
'plinth',
|
||||
'freedombox',
|
||||
]
|
||||
|
||||
# Overridden based on configuration key use_x_forwarded_host
|
||||
@ -137,7 +137,7 @@ IPWARE_META_PRECEDENCE_ORDER = ('REMOTE_ADDR', )
|
||||
LANGUAGES = [('en', 'English')]
|
||||
|
||||
# A list of directories where Django looks for translation files.
|
||||
LOCALE_PATHS = ['plinth/locale']
|
||||
LOCALE_PATHS = ['freedombox/locale']
|
||||
|
||||
# Overridden by log configuration in log.py
|
||||
LOGGING = {'version': 1}
|
||||
@ -150,7 +150,7 @@ LOGIN_REDIRECT_URL = 'index'
|
||||
MESSAGE_TAGS: dict = {}
|
||||
|
||||
MIDDLEWARE = (
|
||||
'plinth.middleware.CommonHeadersMiddleware',
|
||||
'freedombox.middleware.CommonHeadersMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
@ -159,12 +159,12 @@ MIDDLEWARE = (
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'plinth.middleware.CommonErrorMiddleware',
|
||||
'freedombox.middleware.CommonErrorMiddleware',
|
||||
'stronghold.middleware.LoginRequiredMiddleware',
|
||||
'plinth.middleware.AdminRequiredMiddleware',
|
||||
'plinth.middleware.FirstSetupMiddleware',
|
||||
'plinth.modules.first_boot.middleware.FirstBootMiddleware',
|
||||
'plinth.middleware.SetupMiddleware',
|
||||
'freedombox.middleware.AdminRequiredMiddleware',
|
||||
'freedombox.middleware.FirstSetupMiddleware',
|
||||
'freedombox.modules.first_boot.middleware.FirstBootMiddleware',
|
||||
'freedombox.middleware.SetupMiddleware',
|
||||
|
||||
# AxesMiddleware should be the last middleware. It only formats user
|
||||
# lockout messages and renders Axes lockout responses on failed user
|
||||
@ -173,8 +173,10 @@ MIDDLEWARE = (
|
||||
)
|
||||
|
||||
OAUTH2_PROVIDER = {
|
||||
'OIDC_ENABLED': True,
|
||||
'OAUTH2_VALIDATOR_CLASS': 'plinth.modules.oidc.validators.OAuth2Validator',
|
||||
'OIDC_ENABLED':
|
||||
True,
|
||||
'OAUTH2_VALIDATOR_CLASS':
|
||||
'freedombox.modules.oidc.validators.OAuth2Validator',
|
||||
'SCOPES': {
|
||||
'openid':
|
||||
_('Uniquely identify your user account with username'),
|
||||
@ -188,13 +190,13 @@ OAUTH2_PROVIDER = {
|
||||
}
|
||||
|
||||
PASSWORD_HASHERS = [
|
||||
'plinth.hashers.Argon2PasswordHasherLowMemory',
|
||||
'freedombox.hashers.Argon2PasswordHasherLowMemory',
|
||||
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
|
||||
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
|
||||
'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'plinth.urls'
|
||||
ROOT_URLCONF = 'freedombox.urls'
|
||||
|
||||
SECURE_CONTENT_TYPE_NOSNIFF = True
|
||||
|
||||
@ -231,7 +233,7 @@ TEMPLATES = [
|
||||
'django.template.context_processors.static',
|
||||
'django.template.context_processors.tz',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'plinth.context_processors.common',
|
||||
'freedombox.context_processors.common',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@ -37,7 +37,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.messages',
|
||||
'oauth2_provider',
|
||||
'stronghold',
|
||||
'plinth',
|
||||
'freedombox',
|
||||
]
|
||||
|
||||
# These are included here solely to suppress Django warnings
|
||||
@ -48,7 +48,7 @@ MIDDLEWARE = (
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'plinth.tests.data.urls'
|
||||
ROOT_URLCONF = 'freedombox.tests.data.urls'
|
||||
|
||||
SECRET_KEY = 'django_tests_secret_key'
|
||||
|
||||
@ -57,7 +57,7 @@ STRONGHOLD_PUBLIC_URLS = (r'^/o/', )
|
||||
TEMPLATES = [{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'APP_DIRS': True,
|
||||
'DIRS': ['plinth/tests/data/templates/'],
|
||||
'DIRS': ['freedombox/tests/data/templates/'],
|
||||
}]
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user