Skip to content

Commit 405a416

Browse files
committed
Remove comments, enable cache
1 parent aff6e0c commit 405a416

File tree

4 files changed

+6
-78
lines changed

4 files changed

+6
-78
lines changed

config/allauth_settings.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@
1818
USE_I18N = False
1919
USE_TZ = True
2020

21-
# DATABASES = {
22-
# "default": {
23-
# "ENGINE": "django.db.backends.sqlite3",
24-
# "NAME": ":memory:",
25-
# "USER": "",
26-
# "PASSWORD": "",
27-
# "HOST": "",
28-
# "PORT": "",
29-
# }
30-
# }
31-
3221
DATABASES = {
3322
"default": django_mongodb_backend.parse_uri(DATABASE_URL),
3423
}
@@ -262,10 +251,6 @@ class MyPBKDF2PasswordHasher(PBKDF2PasswordHasher):
262251

263252
ACCOUNT_LOGIN_BY_CODE_ENABLED = True
264253

265-
# MFA_SUPPORTED_TYPES = ["totp", "webauthn", "recovery_codes"]
266-
# MFA_PASSKEY_LOGIN_ENABLED = True
267-
# MFA_PASSKEY_SIGNUP_ENABLED = True
268-
269254
HEADLESS_SERVE_SPECIFICATION = True
270255
DEFAULT_AUTO_FIELD = "django_mongodb_backend.fields.ObjectIdAutoField"
271256
MIGRATION_MODULES = {
@@ -283,22 +268,3 @@ class MyPBKDF2PasswordHasher(PBKDF2PasswordHasher):
283268
SILENCED_SYSTEM_CHECKS = [
284269
"sites.E101", # SITE_ID must be an ObjectId for MongoDB.
285270
]
286-
287-
# INSTALLED_APPS = [
288-
# "allauth",
289-
# "allauth.mongo_apps.MongoContentTypesConfig",
290-
# "allauth.mongo_apps.MongoAuthConfig",
291-
# "allauth.mongo_apps.MongoAccountConfig",
292-
# "allauth.mongo_apps.MongoAdminConfig",
293-
# "allauth.mongo_apps.MongoUserSessionsConfig",
294-
# "allauth.mongo_apps.MongoHeadlessConfig",
295-
# "allauth.mongo_apps.MongoSocialAccountConfig",
296-
# "allauth.mongo_apps.MongoMFAConfig",
297-
# "django.contrib.humanize",
298-
# "django.contrib.messages",
299-
# "django.contrib.sessions",
300-
# "django.contrib.sites",
301-
# "allauth.socialaccount.providers.openid",
302-
# "allauth.socialaccount.providers.openid_connect",
303-
# "allauth.socialaccount.providers.agave",
304-
# ]

config/filter_settings.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
import django_mongodb_backend
55
import os
66

7-
# DATABASES = {
8-
# "default": {
9-
# "ENGINE": "django.db.backends.sqlite3",
10-
# "NAME": ":memory:",
11-
# },
12-
# }
13-
147
DATABASES = {}
158
DATABASE_URL = os.environ.get("MONGODB_URI", "mongodb://localhost:27017/djangotests")
169
DATABASES["default"] = django_mongodb_backend.parse_uri(DATABASE_URL)

config/rest_framework_settings.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@ def pytest_configure(config):
2323

2424
settings.configure(
2525
DEBUG_PROPAGATE_EXCEPTIONS=True,
26-
# DATABASES={
27-
# 'default': {
28-
# 'ENGINE': 'django.db.backends.sqlite3',
29-
# 'NAME': ':memory:'
30-
# },
31-
# 'secondary': {
32-
# 'ENGINE': 'django.db.backends.sqlite3',
33-
# 'NAME': ':memory:'
34-
# }
35-
# },
3626
DATABASES={
3727
"default": django_mongodb_backend.parse_uri(DATABASE_URL),
3828
},

config/wagtail_settings.py

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@
183183
# Using DatabaseCache to make sure that the cache is cleared between tests.
184184
# This prevents false-positives in some wagtail core tests where we are
185185
# changing the 'wagtail_root_paths' key which may cause future tests to fail.
186-
# CACHES = {
187-
# "default": {
188-
# "BACKEND": "django.core.cache.backends.db.DatabaseCache",
189-
# "LOCATION": "cache",
190-
# }
191-
# }
186+
CACHES = {
187+
"default": {
188+
"BACKEND": "django_mongodb_backend.cache.MongoDBCache",
189+
"LOCATION": "cache",
190+
}
191+
}
192192

193193
PASSWORD_HASHERS = (
194194
"django.contrib.auth.hashers.MD5PasswordHasher", # don't use the intentionally slow default password hasher
@@ -286,27 +286,6 @@
286286
MONGODB_URI = os.environ.get("MONGODB_URI", "mongodb://localhost:27017/wagtail")
287287
DATABASES["default"] = django_mongodb_backend.parse_uri(MONGODB_URI)
288288

289-
# MIGRATION_MODULES = {
290-
# "admin": "wagtail.test.mongo_migrations.admin",
291-
# "auth": "wagtail.test.mongo_migrations.auth",
292-
# "contenttypes": "wagtail.test.mongo_migrations.contenttypes",
293-
# "demosite": "wagtail.test.mongo_migrations.demosite",
294-
# "earlypage": "wagtail.test.mongo_migrations.earlypage",
295-
# "i18n": "wagtail.test.mongo_migrations.i18n",
296-
# "routablepagetests": "wagtail.test.mongo_migrations.routablepagetests",
297-
# "taggit": "wagtail.test.mongo_migrations.taggit",
298-
# "tests": "wagtail.test.mongo_migrations.tests",
299-
# "wagtaildocs": "wagtail.test.mongo_migrations.wagtaildocs",
300-
# "wagtailredirects": "wagtail.test.mongo_migrations.wagtailredirects",
301-
# "wagtailimages": "wagtail.test.mongo_migrations.wagtailimages",
302-
# "wagtailsearch": "wagtail.test.mongo_migrations.wagtailsearch",
303-
# "wagtailsearchpromotions": "wagtail.test.mongo_migrations.wagtailsearchpromotions",
304-
# "wagtailadmin": "wagtail.test.mongo_migrations.wagtailadmin",
305-
# "wagtailcore": "wagtail.test.mongo_migrations.wagtailcore",
306-
# "wagtailforms": "wagtail.test.mongo_migrations.wagtailforms",
307-
# "wagtailembeds": "wagtail.test.mongo_migrations.wagtailembeds",
308-
# "wagtailusers": "wagtail.test.mongo_migrations.wagtailusers",
309-
# }
310289
MIGRATION_MODULES = {
311290
"admin": None,
312291
"auth": None,

0 commit comments

Comments
 (0)