Changes to payment models #32
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: data.coop/membersystem#32
Loading…
Reference in a new issue
No description provided.
Delete branch "benjaoming/membersystem:payment-updates"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Flagging incoming changes, no actions required.
This is stuff I consider "MVP", as in what we need urgently to send out payment links to members and receive payments via Stripe.
An update: I've added a list of tasks in the description. This is getting nearer. If possible, I would consider to deploy some of the changes early so it's possible to add memberships and get things tested early.
@ -23,6 +23,8 @@ dependencies = [
"django-registries==0.0.3",
"django-view-decorator==0.0.4",
"django-oauth-toolkit~=2.4",
"django_stubs_ext~=5.0",
Noting that this got reintroduced... I don't use it... but is it used? Or did you remove it on purpose @valberg ?
I did not do it on purpose no 😊 my all means remove it if it is isn't being used
Oh god now I know what's going on... it's for the mypy django-stubs thing...
Yes, we need it for running mypy with Django. I think I spend 2 minutes to get it working. But I didn't actually fix any errors. I think we can keep it for now and then we should open an issue if we want to keep using it.
Or we can decide that we don't want to spend time on this because it doesn't find any real issues.
#37
@ -67,3 +69,3 @@
no-cov = "cov --no-cov {args}"
typecheck = "mypy --config-file=pyproject.toml ."
requirements = "hatch env run --env default -- python --version; hatch env run --env dev -- python --version"
requirements = "pip-compile pyproject.toml"
Isn't this the correct way @valberg ?
Yeah the one being removed is the "correct" way which I found at https://github.com/juftin/hatch-pip-compile/blob/main/docs/upgrading.md
I get this error when running it:
LockFileError: Could not find lock file python version
Maybe that error is because the old "requirements.txt" I had didn't specify the Python version using the same string pattern 🤪
Notably when this was changed, the command started working:
After that, it started working.
I've restored it...
hatch env run --env default -- python --version; hatch env run --env dev -- python --version
is really incomprehensible compared to the old version, also funny thathatch run dev:requirements
spawns another hatch command in another environment - but I guess that it's just part of some magic that Just Works.@ -13,3 +13,3 @@
]
dependencies = [
"Django~=5.0",
"Django>=5.1b1,<5.2",
It should be okay to use the new Django 5.1... then we can help out if we discover a bug :) it's rc1 now...
@ -25,6 +28,8 @@ CSRF_TRUSTED_ORIGINS = env.list(
ADMINS = [tuple(x.split(":")) for x in env.list("DJANGO_ADMINS", default=[])]
DEFAULT_FROM_EMAIL = "server@data.coop"
This is important for sending error 500 emails because often the default "@localhost" will not succeed.
@ -2,4 +0,0 @@
testpaths = .
python_files = tests.py test_*.py *_tests.py
DJANGO_SETTINGS_MODULE = project.settings
#norecursedirs = dist tmp* .svn .*
This belongs in pyproject.toml now
@ -5,3 +6,4 @@
from django.utils.translation import gettext_lazy as _
from environs import Env
django_stubs_ext.monkeypatch()
This is where django-stubs is used. It's said to be "production safe" :)
Ah yes! I can vouch for it - we use it at $WORK without issues
Nice! I'm gonna vouch that we keep it for now and see if we'll start using mypy checks or not... now at least, it can be run.
#37
All the merge conflicts took the air out of the balloon.. gonna continue tomorrow and ping you once the last couple of items are solved @valberg
(however, I think that I would prefer to add the email stuff in a follow-up PR because it's gonna be sent async anyways.. so we can always send folks a confirmation email later, as long as we store the data in the db)
WIP: Changes to payment modelsto Changes to payment modelsAre you getting ready to deploy? I'm on parental duties today, but I'll have some time in the evening if there's something bork'ed.
In case it deploys and works well, I can start to put data in the system (products, MembershipTypes, generate orders etc).
If you can confirm that
send_mail
works, I'll also start to work on a change that can send out payment links to members. In parallel to that, I'll give some test bunnies from the board a payment link so we know it works :)@benjaoming I can do the deploy tonight