Skip to content

Conversation

@shorodilov
Copy link
Contributor

@shorodilov shorodilov commented Dec 10, 2025

This pull request introduces several important changes to the project, focusing on three main areas: user authentication (with a custom user model), project configuration and settings, and development tooling/CI improvements. The changes include the addition of a custom user app, updates to configuration files to support the new app and email features, and some cleanup of workflow and dependency management files.

User authentication and custom user model:

  • Added a new user Django app with a custom User model inheriting from AbstractUser, including initial migrations, admin registration, and app configuration (src/user/models.py, src/user/migrations/0001_initial.py, src/user/admin.py, src/user/apps.py). [1] [2] [3] [4]
  • Registered the custom user model in Django settings and updated INSTALLED_APPS to include the new app (src/website/settings.py). [1] [2]

Project configuration and settings:

  • Renamed the main Django project from project_core to website and updated all relevant settings, ASGI/WSGI modules, and URL configuration references (src/website/settings.py, src/website/asgi.py, src/website/wsgi.py, src/manage.py). [1] [2] [3] [4] [5]
  • Changed static file serving configuration and added email backend settings for local development, including credentials for MailHog (src/website/settings.py, containers/compose.yaml, containers/mailhog/auth.txt). [1] [2] [3]
  • Updated the Postgres service image reference to use the full Docker registry path (containers/compose.yaml).

Development tooling and CI improvements:

  • Removed the auto-assign GitHub workflow and its configuration, cleaning up unused automation files (.github/workflows/auto-assign.yml, .github/auto-assign.yml). [1] [2]
  • Updated Python version formatting in the linter workflow for improved compatibility (.github/workflows/run-linters.yml).
  • Switched to using dependency groups in pyproject.toml, added configuration for bumpver and black, and reorganized dev dependencies (pyproject.toml).

shorodilov and others added 26 commits December 7, 2025 19:07
Updated dependency versions in `uv.lock`.
Updated `.github/auto-assign.yml` with improved comments and optional
fields. Switched to `kentaro-m/[email protected]`.
Added `bumpver` with configuration for versioning.
Updated dev dependencies to include `pytest-django` with version
constraints. Updated lock file accordingly.
Deleted the `.github/workflows/auto-assign.yml` and related
`.github/auto-assign.yml` files as the workflow fails.
This requires additional research for compatible GH action.
- **build: update dependencies and add `bumpver`**
- **bump version 2025.10rc1 -> 2025.1001dev0**
- **Configure MailHog with authentication and email settings**
- **Specify full image path for PostgreSQL in compose.yaml**
Updated dependency versions in `uv.lock`.
Updated `version_pattern` in `pyproject.toml` to use
`YYYY.0M[.PATCH][PYTAGNUM]`.
Adjusted `current_version` to match the new pattern.
Introduced a custom user model extending `AbstractUser` with migration.
Registered the model in admin and configured `AUTH_USER_MODEL`.
Updated `STATIC_URL` in `settings.py` to `http://localhost:8888`
for proper resolution of static resources during local development.
Updated `STATIC_URL` in `settings.py` to `http://localhost:8888`
for proper resolution of static resources during local development.
Introduced a custom user model extending `AbstractUser` with migration.
Registered the model in admin and configured `AUTH_USER_MODEL`.
Updated all references from `project_core` to `website`, including
settings, URLs, WSGI, ASGI, and `manage.py` to reflect the new app
name structure.
Added Black-specific settings in `pyproject.toml` including line length,
target Python versions, and file inclusion pattern to standardize code
formatting.
Removed redundant line breaks to improve readability of the initial user
migration file.
Additionally, added a missing trailing comma in the installed apps list
in `settings.py`.
- **[GH-14] feat: configure Black formatting rules in pyproject.toml**
- **[black] fix: clean up formatting in initial user migration and
settings**
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the Django template project for the 2025.12 release, upgrading dependencies to their latest versions and restructuring the project to use a custom user model with proper configuration.

Changes:

  • Upgraded core dependencies including Django (5.2.7 → 5.2.9 for Python <3.12, and new 6.0 for Python ≥3.12), Black (25.9.0 → 25.12.0), and other packages
  • Restructured project from "project_core" to "website" naming convention
  • Added custom User model implementation with migrations and admin integration
  • Configured bumpver for version management and added email/static file settings

Reviewed changes

Copilot reviewed 14 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Updated all Python package dependencies to latest compatible versions with resolution markers for Python 3.12+
pyproject.toml Changed from optional-dependencies to dependency-groups, added bumpver and black configuration
src/website/settings.py Renamed from project_core, added user app, email configuration, and custom user model setting
src/website/{wsgi.py,asgi.py,urls.py} Updated module references from project_core to website, added URL configuration
src/manage.py Updated settings module reference from project_core to website
src/user/* Added complete custom user model implementation with migrations, admin, and app config
containers/compose.yaml Updated postgres image path and added MailHog authentication configuration
containers/mailhog/auth.txt Added authentication credentials for MailHog
.github/workflows/run-linters.yml Fixed Python version specification to use quoted string
.github/workflows/auto-assign.yml Removed auto-assign workflow
.github/auto-assign.yml Removed auto-assign configuration
Comments suppressed due to low confidence (2)

src/website/settings.py:126

  • The STATIC_URL is hardcoded to "http://localhost:8888/" which will break in production and non-local environments. This should be configurable through environment variables or use a relative path like "static/" for proper deployment flexibility. The localhost URL should only be used in development settings.
    src/website/settings.py:141
  • The email configuration is hardcoded with development values (localhost:1025, plain text credentials). This configuration should not be in the main settings file or should be loaded from environment variables to avoid accidentally using development email settings in production. Consider using environment variables with defaults for development.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



class UserConfig(AppConfig):
name = "user"
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AppConfig class is missing the default_auto_field attribute. While this will work, Django best practices recommend explicitly setting this to avoid migration warnings. Consider adding default_auto_field = "django.db.models.BigAutoField" to match the project's DEFAULT_AUTO_FIELD setting.

Suggested change
name = "user"
name = "user"
default_auto_field = "django.db.models.BigAutoField"

Copilot uses AI. Check for mistakes.


class User(AbstractUser):
pass
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The User model class is missing a docstring. While it currently only inherits from AbstractUser without modifications, it's a best practice to document the purpose and intended use of custom user models, especially as they typically grow to include custom fields and methods.

Suggested change
pass
"""Custom user model for this project, extending Django's ``AbstractUser``.
This class currently does not add any additional fields or behavior, but
serves as the central place to define project-specific user-related
functionality (e.g., extra profile fields, custom managers, or methods).
"""

Copilot uses AI. Check for mistakes.
@shorodilov shorodilov added the stale Outdated changes label Jan 11, 2026
@shorodilov shorodilov changed the base branch from main to release/2026.01 January 11, 2026 02:51
@devsforge devsforge locked and limited conversation to collaborators Jan 11, 2026
@shorodilov shorodilov merged commit f0e2741 into release/2026.01 Jan 11, 2026
8 checks passed
@shorodilov shorodilov deleted the release/2025.12 branch January 11, 2026 02:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

stale Outdated changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants