mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-24 09:48:48 +02:00
Setup payment interface
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -492,8 +492,8 @@ class VolunteerRegistration(Registration):
|
||||
verbose_name_plural = _("volunteer registrations")
|
||||
|
||||
|
||||
def get_scholarship_filename(instance, filename):
|
||||
return f"authorization/scholarship/scholarship_{instance.registration.pk}"
|
||||
def get_receipt_filename(instance, filename):
|
||||
return f"authorization/receipt/receipt_{instance.id}"
|
||||
|
||||
|
||||
class Payment(models.Model):
|
||||
@ -526,7 +526,7 @@ class Payment(models.Model):
|
||||
max_length=16,
|
||||
choices=[
|
||||
('', _("No payment")),
|
||||
('helloasso', "Hello Asso"),
|
||||
('helloasso', _("Credit card")),
|
||||
('scholarship', _("Scholarship")),
|
||||
('bank_transfer', _("Bank transfer")),
|
||||
('other', _("Other (please indicate)")),
|
||||
@ -546,7 +546,7 @@ class Payment(models.Model):
|
||||
receipt = models.FileField(
|
||||
verbose_name=_("receipt"),
|
||||
help_text=_("only if you have a scholarship or if you chose a bank transfer."),
|
||||
upload_to=get_scholarship_filename,
|
||||
upload_to=get_receipt_filename,
|
||||
blank=True,
|
||||
default="",
|
||||
)
|
||||
|
Reference in New Issue
Block a user