Skip to content

Commit 972c824

Browse files
heysamtexasclaude
andcommitted
feat: implement django-allauth fork infrastructure
This commit sets up comprehensive infrastructure for managing a django-allauth fork with user feedback improvements while maintaining ability to contribute back upstream. Changes: - Switch django-allauth dependency to heysamtexas/django-allauth fork - Add Makefile targets for dependency management (dev-allauth/prod-allauth) - Add pre-commit hook to prevent shipping local django-allauth dependencies - Add allauth-status target to show current dependency source - Update lock files and dependencies with [mfa,socialaccount] extras The fork includes user feedback improvements for email verification flows, addressing missing success messages when users click "Re-send Verification". 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 00ef439 commit 972c824

File tree

4 files changed

+83
-33
lines changed

4 files changed

+83
-33
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ repos:
2626
hooks:
2727
- id: bandit
2828
args: ['-c', 'pyproject.toml']
29+
30+
- repo: local
31+
hooks:
32+
- id: check-django-allauth-prod
33+
name: Check django-allauth is production-ready
34+
entry: bash -c 'if grep -E "(editable.*django-allauth|django-allauth.*\.\./)" pyproject.toml; then echo "❌ ERROR: Local django-allauth detected in pyproject.toml. Run '\''make prod-allauth'\'' first."; exit 1; fi'
35+
language: system
36+
files: pyproject.toml
37+
pass_filenames: false

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,23 @@ snapshot-local-db: ## Create a snapshot of the local database
5858
.PHONY: restore-local-db
5959
restore-local-db: ## Restore the local database from a snapshot
6060
docker compose exec -T postgres pg_restore -U postgres -d django_reference < django_reference.dump
61+
62+
##########################################################################
63+
# DJANGO-ALLAUTH DEPENDENCY MANAGEMENT
64+
##########################################################################
65+
66+
.PHONY: dev-allauth
67+
dev-allauth: ## Switch to local editable django-allauth install (if workspace exists)
68+
@echo "⚠️ Local development not fully working yet - use prod-allauth instead"
69+
@exit 1
70+
71+
.PHONY: prod-allauth
72+
prod-allauth: ## Switch to remote git django-allauth source
73+
-uv remove django-allauth
74+
uv add "django-allauth[mfa,socialaccount] @ git+https://github.com/heysamtexas/django-allauth.git@heysamtexas-patches"
75+
@echo "✅ Switched to remote git django-allauth"
76+
77+
.PHONY: allauth-status
78+
allauth-status: ## Show current django-allauth source
79+
@echo "Current django-allauth dependency:"
80+
@grep "django-allauth" pyproject.toml || echo "django-allauth not found in pyproject.toml"

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ dependencies = [
1717
"charset-normalizer==3.4.2",
1818
"django-environ==0.12.0",
1919
"Django==5.2.4",
20-
"django-allauth[mfa]==65.10.0",
2120
"django-bootstrap5==25.1",
2221
"django-solo==2.4.0",
2322
"gunicorn==23.0.0",
@@ -31,6 +30,7 @@ dependencies = [
3130
"urllib3==2.5.0",
3231
"whitenoise==6.9.0",
3332
"PyJWT==2.10.1",
33+
"django-allauth[mfa,socialaccount]",
3434
]
3535

3636
[project.optional-dependencies]
@@ -111,3 +111,6 @@ version_files = [
111111
"pyproject.toml:version",
112112
"Dockerfile:VERSION",
113113
]
114+
115+
[tool.uv.sources]
116+
django-allauth = { git = "https://github.com/heysamtexas/django-allauth.git", rev = "heysamtexas-patches" }

0 commit comments

Comments
 (0)