Repository: dynaconf/dynaconf

Issue:
Django 4.2.5 and Dynaconf 3.2.2 (AttributeError)
**Describe the bug**
When I try to access the Django admin, the Django log shows many error messages, such as: 

```bash
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/czar/.pyenv/versions/3.11.5/lib/python3.11/wsgiref/handlers.py", line 137, in run
    self.result = application(self.environ, self.start_response)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/contrib/staticfiles/handlers.py", line 80, in __call__
    return self.application(environ, start_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/core/handlers/wsgi.py", line 124, in __call__
    response = self.get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 140, in get_response
    response = self._middleware_chain(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 181, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/views/debug.py", line 67, in technical_500_response
    html = reporter.get_traceback_html()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/views/debug.py", line 410, in get_traceback_html
    c = Context(self.get_traceback_data(), use_l10n=False)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/views/debug.py", line 379, in get_traceback_data
    "settings": self.filter.get_safe_settings(),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/views/debug.py", line 154, in get_safe_settings
    settings_dict[k] = self.cleanse_setting(k, getattr(settings, k))
                                               ^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/dynaconf/base.py", line 145, in __getattr__
    value = getattr(self._wrapped, name)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/dynaconf/base.py", line 309, in __getattribute__
    return super().__getattribute__(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'HookableSettings' object has no attribute '_REGISTERED_HOOKS'
```

**To Reproduce**
- Pop_OS 22.04
- python 3.11.5
- django 4.2.5
- dynaconf 3.2.2

I'm using **poetry** in development, but when I use **pip** the problem also happens

1. Having the following folder structure

.
├── LICENSE
├── README.md
├── poetry.lock
├── poetry.toml
├── pyproject.toml
├── pytest.ini
├── requirements.txt
├── settings.yaml
├── src
│   ├── apps
│   │   ├── accounts
│   │   ├── area_skill
│   │   ├── base
│   │   ├── certified
│   │   ├── highlight
│   │   ├── post
│   │   └── profile
│   ├── conftest.py
│   ├── flab
│   │   ├── __init__.py
│   │   ├── asgi.py
│   │   ├── common.py
│   │   ├── settings
│   │   ├── urls.py
│   │   └── wsgi.py
│   ├── manage.py
│   └── tests
│       └── post
│           ├── test_post__status_code.py
│           ├── test_post__urls.py
│           └── test_post__views.py
└── www
    ├── assets
    ├── media
    └── static

<details>
<summary> Project structure </summary>

```python
# settings.py

""" here are the other django settings """

import os
import dynaconf  # noqa


settings = dynaconf.DjangoDynaconf(
    __name__,
    ENVVAR_PREFIX="FLAB",
    SETTINGS_FILE_FOR_DYNACONF="../settings.yaml",
    SECRETS_FOR_DYNACONF="../.secrets.yaml",
)  # noqa

```
</details>

2. Having the following config files:

<!-- Please adjust if you are using different files and formats! -->

<details>
<summary> Config files </summary>

**/path/.env**
```ini
ENV_FOR_DYNACONF="DEVELOPMENT"
# ENV_FOR_DYNACONF="PRODUCTION"
```

and

**/path/settings.yaml**
```yaml
---
development:
  DEBUG: true
  ALLOWED_HOSTS:
    - localhost
    - 127.0.0.1
    - testserver
  DATABASES:
    default: 
      ENGINE: django.db.backends.postgresql_psycopg2
      NAME: ########
      USER: ########
      PASSWORD: ########
      HOST: ########
      PORT: ########
  EMAIL_BACKEND: django.core.mail.backends.console.EmailBackend


production:
  DEBUG: false
  ALLOWED_HOSTS:
    - localhost
    - 127.0.0.1
  DATABASES:
    default: 
      ENGINE: django.db.backends.postgresql_psycopg2
      NAME: ########
      USER: ########
      PASSWORD: ########
      HOST: ########
      PORT: ########
```

</details>

3. Having the following app code:

<details>
<summary> Code </summary>

**/path/src/app.py**
```python
from dynaconf import settings
...
```

</details>

4. Executing under the following environment

<details>
<summary> Execution </summary>

```bash
$ poetry shell
$ src/manage.py runserver
```

</details>

**Expected behavior**
I hope the error messages stop appearing in the Django log.

**Environment (please complete the following information):**
 - OS: Linux/Pop_OS 22.04
 - Dynaconf Version 3.2.2
 - Frameworks in use Django 4.2.5

**Additional context**
Add any other context about the problem here.

Django 4.2.5 and Dynaconf 3.2.2 (AttributeError)
**Describe the bug**
When I try to access the Django admin, the Django log shows many error messages, such as: 

```bash
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/czar/.pyenv/versions/3.11.5/lib/python3.11/wsgiref/handlers.py", line 137, in run
    self.result = application(self.environ, self.start_response)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/contrib/staticfiles/handlers.py", line 80, in __call__
    return self.application(environ, start_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/core/handlers/wsgi.py", line 124, in __call__
    response = self.get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 140, in get_response
    response = self._middleware_chain(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 181, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/views/debug.py", line 67, in technical_500_response
    html = reporter.get_traceback_html()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/views/debug.py", line 410, in get_traceback_html
    c = Context(self.get_traceback_data(), use_l10n=False)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/views/debug.py", line 379, in get_traceback_data
    "settings": self.filter.get_safe_settings(),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/django/views/debug.py", line 154, in get_safe_settings
    settings_dict[k] = self.cleanse_setting(k, getattr(settings, k))
                                               ^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/dynaconf/base.py", line 145, in __getattr__
    value = getattr(self._wrapped, name)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/czar/dev/projects/FuturesLab/flab-issue/.venv/lib/python3.11/site-packages/dynaconf/base.py", line 309, in __getattribute__
    return super().__getattribute__(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'HookableSettings' object has no attribute '_REGISTERED_HOOKS'
```

**To Reproduce**
- Pop_OS 22.04
- python 3.11.5
- django 4.2.5
- dynaconf 3.2.2

I'm using **poetry** in development, but when I use **pip** the problem also happens

1. Having the following folder structure

.
├── LICENSE
├── README.md
├── poetry.lock
├── poetry.toml
├── pyproject.toml
├── pytest.ini
├── requirements.txt
├── settings.yaml
├── src
│   ├── apps
│   │   ├── accounts
│   │   ├── area_skill
│   │   ├── base
│   │   ├── certified
│   │   ├── highlight
│   │   ├── post
│   │   └── profile
│   ├── conftest.py
│   ├── flab
│   │   ├── __init__.py
│   │   ├── asgi.py
│   │   ├── common.py
│   │   ├── settings
│   │   ├── urls.py
│   │   └── wsgi.py
│   ├── manage.py
│   └── tests
│       └── post
│           ├── test_post__status_code.py
│           ├── test_post__urls.py
│           └── test_post__views.py
└── www
    ├── assets
    ├── media
    └── static

<details>
<summary> Project structure </summary>

```python
# settings.py

""" here are the other django settings """

import os
import dynaconf  # noqa


settings = dynaconf.DjangoDynaconf(
    __name__,
    ENVVAR_PREFIX="FLAB",
    SETTINGS_FILE_FOR_DYNACONF="../settings.yaml",
    SECRETS_FOR_DYNACONF="../.secrets.yaml",
)  # noqa

```
</details>

2. Having the following config files:

<!-- Please adjust if you are using different files and formats! -->

<details>
<summary> Config files </summary>

**/path/.env**
```ini
ENV_FOR_DYNACONF="DEVELOPMENT"
# ENV_FOR_DYNACONF="PRODUCTION"
```

and

**/path/settings.yaml**
```yaml
---
development:
  DEBUG: true
  ALLOWED_HOSTS:
    - localhost
    - 127.0.0.1
    - testserver
  DATABASES:
    default: 
      ENGINE: django.db.backends.postgresql_psycopg2
      NAME: ########
      USER: ########
      PASSWORD: ########
      HOST: ########
      PORT: ########
  EMAIL_BACKEND: django.core.mail.backends.console.EmailBackend


production:
  DEBUG: false
  ALLOWED_HOSTS:
    - localhost
    - 127.0.0.1
  DATABASES:
    default: 
      ENGINE: django.db.backends.postgresql_psycopg2
      NAME: ########
      USER: ########
      PASSWORD: ########
      HOST: ########
      PORT: ########
```

</details>

3. Having the following app code:

<details>
<summary> Code </summary>

**/path/src/app.py**
```python
from dynaconf import settings
...
```

</details>

4. Executing under the following environment

<details>
<summary> Execution </summary>

```bash
$ poetry shell
$ src/manage.py runserver
```

</details>

**Expected behavior**
I hope the error messages stop appearing in the Django log.

**Environment (please complete the following information):**
 - OS: Linux/Pop_OS 22.04
 - Dynaconf Version 3.2.2
 - Frameworks in use Django 4.2.5

**Additional context**
Add any other context about the problem here.



Discussion:
Hey, I am getting the same error when upgrading dynaconf from **3.2.1 -> 3.2.2** (django 4.1.11).
Also, for me it is not limited to the admin page. I hope this helps locating the issue.
Thanks for the great work!
I am working on it and hopefully the patch version is coming soon
Hey, I am getting the same error when upgrading dynaconf from **3.2.1 -> 3.2.2** (django 4.1.11).
Also, for me it is not limited to the admin page. I hope this helps locating the issue.
Thanks for the great work!
I am working on it and hopefully the patch version is coming soon

Resolving patch:
diff --git a/dynaconf/hooking.py b/dynaconf/hooking.py
--- a/dynaconf/hooking.py
+++ b/dynaconf/hooking.py
@@ -5,6 +5,8 @@
 from functools import wraps
 from typing import Any
 from typing import Callable
+from typing import Dict
+from typing import List
 
 from dynaconf.base import RESERVED_ATTRS
 from dynaconf.base import Settings
@@ -300,6 +302,9 @@ class Action(str, Enum):
 class HookableSettings(Settings):
     """Wrapper for dynaconf.base.Settings that adds hooks to get method."""
 
+    _REGISTERED_HOOKS: dict[Action, list[Hook]] = {}
+    # needed because django of Django admin see #1000
+
     @hookable
     def get(self, *args, **kwargs):
         return Settings.get(self, *args, **kwargs)


Test patch:
diff --git a/tests_functional/issues/1000_django_attribute_error/flab/.env b/tests_functional/issues/1000_django_attribute_error/flab/.env
new file mode 100644
--- /dev/null
+++ b/tests_functional/issues/1000_django_attribute_error/flab/.env
@@ -0,0 +1 @@
+ENV_FOR_DYNACONF="DEVELOPMENT"
diff --git a/tests_functional/issues/1000_django_attribute_error/flab/README.md b/tests_functional/issues/1000_django_attribute_error/flab/README.md
new file mode 100644
--- /dev/null
+++ b/tests_functional/issues/1000_django_attribute_error/flab/README.md
@@ -0,0 +1 @@
+The error described in #1000 happens only when acessing the /admin page
diff --git a/tests_functional/issues/1000_django_attribute_error/flab/flab/__init__.py b/tests_functional/issues/1000_django_attribute_error/flab/flab/__init__.py
new file mode 100644
diff --git a/tests_functional/issues/1000_django_attribute_error/flab/flab/asgi.py b/tests_functional/issues/1000_django_attribute_error/flab/flab/asgi.py
new file mode 100644
--- /dev/null
+++ b/tests_functional/issues/1000_django_attribute_error/flab/flab/asgi.py
@@ -0,0 +1,17 @@
+"""
+ASGI config for flab project.
+
+It exposes the ASGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
+"""
+from __future__ import annotations
+
+import os
+
+from django.core.asgi import get_asgi_application
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "flab.settings")
+
+application = get_asgi_application()
diff --git a/tests_functional/issues/1000_django_attribute_error/flab/flab/settings.py b/tests_functional/issues/1000_django_attribute_error/flab/flab/settings.py
new file mode 100644
--- /dev/null
+++ b/tests_functional/issues/1000_django_attribute_error/flab/flab/settings.py
@@ -0,0 +1,141 @@
+"""
+Django settings for flab project.
+
+Generated by 'django-admin startproject' using Django 4.2.5.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/4.2/ref/settings/
+"""
+from __future__ import annotations
+
+from pathlib import Path
+
+# Build paths inside the project like this: BASE_DIR / 'subdir'.
+BASE_DIR = Path(__file__).resolve().parent.parent
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = (
+    "django-insecure-&zsp%39ihul-#kr7-+2g*kutiye3%4#o)z9b$tayn^j#9fkpmd"
+)
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = [
+    "django.contrib.admin",
+    "django.contrib.auth",
+    "django.contrib.contenttypes",
+    "django.contrib.sessions",
+    "django.contrib.messages",
+    "django.contrib.staticfiles",
+]
+
+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",
+]
+
+ROOT_URLCONF = "flab.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",
+            ],
+        },
+    },
+]
+
+WSGI_APPLICATION = "flab.wsgi.application"
+
+
+# Database
+# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
+
+DATABASES = {
+    "default": {
+        "ENGINE": "django.db.backends.sqlite3",
+        "NAME": BASE_DIR / "db.sqlite3",
+    }
+}
+
+
+# Password validation
+# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators
+
+AUTH_PASSWORD_VALIDATORS = [
+    {
+        "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",  # noqa
+    },
+    {
+        "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",  # noqa
+    },
+    {
+        "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",  # noqa
+    },
+    {
+        "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",  # noqa
+    },
+]
+
+
+# Internationalization
+# https://docs.djangoproject.com/en/4.2/topics/i18n/
+
+LANGUAGE_CODE = "en-us"
+
+TIME_ZONE = "UTC"
+
+USE_I18N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/4.2/howto/static-files/
+
+STATIC_URL = "static/"
+
+# Default primary key field type
+# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
+
+DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
+
+# settings.py
+
+""" here are the other django settings """
+
+import os
+import dynaconf  # noqa
+
+
+settings = dynaconf.DjangoDynaconf(
+    __name__,
+    ENVVAR_PREFIX="FLAB",
+    SETTINGS_FILE_FOR_DYNACONF="../settings.yaml",
+    SECRETS_FOR_DYNACONF="../.secrets.yaml",
+)  # noqa
diff --git a/tests_functional/issues/1000_django_attribute_error/flab/flab/urls.py b/tests_functional/issues/1000_django_attribute_error/flab/flab/urls.py
new file mode 100644
--- /dev/null
+++ b/tests_functional/issues/1000_django_attribute_error/flab/flab/urls.py
@@ -0,0 +1,24 @@
+"""
+URL configuration for flab project.
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+    https://docs.djangoproject.com/en/4.2/topics/http/urls/
+Examples:
+Function views
+    1. Add an import:  from my_app import views
+    2. Add a URL to urlpatterns:  path('', views.home, name='home')
+Class-based views
+    1. Add an import:  from other_app.views import Home
+    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
+Including another URLconf
+    1. Import the include() function: from django.urls import include, path
+    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
+"""
+from __future__ import annotations
+
+from django.contrib import admin
+from django.urls import path
+
+urlpatterns = [
+    path("admin/", admin.site.urls),
+]
diff --git a/tests_functional/issues/1000_django_attribute_error/flab/flab/wsgi.py b/tests_functional/issues/1000_django_attribute_error/flab/flab/wsgi.py
new file mode 100644
--- /dev/null
+++ b/tests_functional/issues/1000_django_attribute_error/flab/flab/wsgi.py
@@ -0,0 +1,17 @@
+"""
+WSGI config for flab project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
+"""
+from __future__ import annotations
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "flab.settings")
+
+application = get_wsgi_application()
diff --git a/tests_functional/issues/1000_django_attribute_error/flab/manage.py b/tests_functional/issues/1000_django_attribute_error/flab/manage.py
new file mode 100755
--- /dev/null
+++ b/tests_functional/issues/1000_django_attribute_error/flab/manage.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+"""Django's command-line utility for administrative tasks."""
+from __future__ import annotations
+
+import os
+import sys
+
+
+def main():
+    """Run administrative tasks."""
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "flab.settings")
+    try:
+        from django.core.management import execute_from_command_line
+    except ImportError as exc:
+        raise ImportError(
+            "Couldn't import Django. Are you sure it's installed and "
+            "available on your PYTHONPATH environment variable? Did you "
+            "forget to activate a virtual environment?"
+        ) from exc
+    execute_from_command_line(sys.argv)
+
+
+if __name__ == "__main__":
+    main()
diff --git a/tests_functional/issues/1000_django_attribute_error/flab/settings.yaml b/tests_functional/issues/1000_django_attribute_error/flab/settings.yaml
new file mode 100644
--- /dev/null
+++ b/tests_functional/issues/1000_django_attribute_error/flab/settings.yaml
@@ -0,0 +1,32 @@
+---
+development:
+  STATIC_ROOT: static
+  DEBUG: true
+  ALLOWED_HOSTS:
+    - localhost
+    - 127.0.0.1
+    - testserver
+  # DATABASES:
+  #   default:
+  #     ENGINE: django.db.backends.postgresql_psycopg2
+  #     NAME: "redacted"
+  #     USER: "redacted"
+  #     PASSWORD: "redacted"
+  #     HOST: "redacted"
+  #     PORT: "redacted"
+  EMAIL_BACKEND: django.core.mail.backends.console.EmailBackend
+
+
+production:
+  DEBUG: false
+  ALLOWED_HOSTS:
+    - localhost
+    - 127.0.0.1
+  # DATABASES:
+  #   default:
+  #     ENGINE: django.db.backends.postgresql_psycopg2
+  #     NAME: "redacted"
+  #     USER: "redacted"
+  #     PASSWORD: "redacted"
+  #     HOST: "redacted"
+  #     PORT: "redacted"