Complete people-domain move into members app; keep names on Member

Finish relocating Member/Family/FamilyMembership from authentication into
a dedicated members app, and revert the half-applied move of member names
onto the global User.

- members: add first_name/last_name back to Member (the whole codebase —
  tests, CSV importer, club app, admin — assumes them, and login-less
  children in families need a name); restore local ordering/index and the
  member__last_name lookups in Family.__str__ and FamilyMembership.
- authentication: drop first_name/last_name from User; get_full_name/
  get_short_name delegate to the linked member, else fall back to email.
- migrations: create members.0001_initial, repoint club.ClubMembership FK
  (club.0005), delete the models from authentication (0004, rewritten to
  plain DeleteModel ops in child-first order to avoid a SQLite table-remake
  crash).
- fix stale imports across apps (authentication/club tests, CSV importer)
  and missing imports/URLs in members tests; add missing _ import in
  members/admin.py; export MemberCsvImporter from members.services.

Full suite green (64 tests), ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-12 00:16:41 +02:00
parent 19b92d61f7
commit f3b1ae7e82
29 changed files with 942 additions and 664 deletions

View File

@@ -11,6 +11,6 @@ import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'clubmanager.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "clubmanager.settings")
application = get_asgi_application()

View File

@@ -46,6 +46,7 @@ INSTALLED_APPS = [
"phonenumber_field",
"club.apps.ClubConfig",
"authentication.apps.AuthenticationConfig",
"members.apps.MembersConfig",
]
MIDDLEWARE = [

View File

@@ -14,9 +14,10 @@ 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 django.contrib import admin
from django.urls import path
urlpatterns = [
path('admin/', admin.site.urls),
path("admin/", admin.site.urls),
]

View File

@@ -11,6 +11,6 @@ import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'clubmanager.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "clubmanager.settings")
application = get_wsgi_application()