🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@berinhard
Copy link
Contributor

This PR introduces a new DateField to required assets for due date. If it's past the asset's due date, the input will be disabled for the user to enter with data in the sponsorship detail page.

Besides that, the PR adds a new Django command to check for assets that will reach the due date in 7 days (by default, but can be passed as argument). Then, an email is sent to the user with the link to the respective sponsorship detail page so they can fulfill their application. The command always asks for a manual confirmation before sending the email, but if you want to use it under a cron job, you must use the --no-input flag to skip the confirmation. Here's a sample on how to use it python manage.py check_sponsorship_assets_due_date 7 --no-input.

Here's a sample of the email's content that I got from the terminal:

Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: You have pendings assets for your application
From: sponsors@python.org
To: ber@ber.com
Date: Fri, 21 Jan 2022 19:00:28 -0000
Message-ID: <164279162857.278656.13781464093342473376@macalandia>

Hi,

Your sponsorship application for Bernardo New requires one or more assets with Jan. 22, 2022 as due date.

Please, submit all information in ordeer for PSF to proceed with your application. You can submit your assets via the following link:

https://python.org/users/sponsorships/95/

Thanks,
Python Software Foundation

PS: Sorry for the PR being polluted by commits from #1959, but since this PR also has migrations, I started the work from that branch to avoid complex migrations corrections. I recommend you to review the PR by the commits.

@berinhard berinhard requested a review from ewdurbin January 21, 2022 19:31
@ewdurbin ewdurbin force-pushed the feature/required-asset-with-due-date branch from 48855a4 to c8b1020 Compare January 24, 2022 21:31
@ewdurbin ewdurbin force-pushed the feature/required-asset-with-due-date branch from c8b1020 to 1b78898 Compare January 24, 2022 21:32
It's OK to allow them to submit after the deadline, as it is mostly for notifying them. If uploads after the deadline are acceptable, the sponsorship team will collect anything put into the boxes
@ewdurbin ewdurbin force-pushed the feature/required-asset-with-due-date branch from 42d1aaf to 98d5973 Compare January 25, 2022 20:30
@ewdurbin ewdurbin merged commit c5c1d04 into main Jan 26, 2022
@ewdurbin ewdurbin deleted the feature/required-asset-with-due-date branch January 26, 2022 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants