- 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.
21 lines
678 B
Python
21 lines
678 B
Python
from __future__ import annotations
|
|
|
|
from django.contrib.auth.models import AbstractUser
|
|
|
|
|
|
class User(AbstractUser):
|
|
"""Custom User model extending Django's AbstractUser.
|
|
|
|
This allows for future customization of the User model
|
|
while maintaining all the default Django User functionality.
|
|
"""
|
|
|
|
# Add any custom fields here in the future
|
|
# For example:
|
|
# bio = models.TextField(max_length=500, blank=True)
|
|
# avatar = models.ImageField(upload_to='avatars/', blank=True, null=True)
|
|
|
|
class Meta:
|
|
db_table = "auth_user" # Keep the same table name as Django's default User
|
|
verbose_name = "User"
|
|
verbose_name_plural = "Users"
|