- Created a new .env.example file for environment variable configuration including Django settings, email configurations, and common SMTP provider examples. - Updated .vscode/settings.json to include additional words for spell checking. - Enhanced config/settings.py to load environment variables using python-dotenv, added data directory management, and configured email settings. - Updated config/urls.py to include debug toolbar URLs conditionally based on testing. - Added pytest configuration in conftest.py for Django testing. - Created core application with custom User model, admin registration, and migrations. - Implemented tests for User model and admin functionalities. - Updated pyproject.toml to include new dependencies for debugging and environment management. - Updated uv.lock to reflect new package versions and dependencies.
18 lines
498 B
Python
18 lines
498 B
Python
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from debug_toolbar.toolbar import debug_toolbar_urls # pyright: ignore[reportMissingTypeStubs]
|
|
from django.conf import settings
|
|
from django.contrib import admin
|
|
from django.urls import path
|
|
|
|
if TYPE_CHECKING:
|
|
from django.urls.resolvers import URLResolver
|
|
|
|
urlpatterns: list[URLResolver] = [
|
|
path(route="admin/", view=admin.site.urls),
|
|
]
|
|
|
|
if not settings.TESTING:
|
|
urlpatterns = [*urlpatterns, *debug_toolbar_urls()]
|