You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep track of current sponsorship year (python#2087)
* Add missing migration to the existing models (managers and meta info)
* New model to keep track of current sponsorship year
* Make sure the singleton object is populated by default via data migration
* Make sure the singleton logic is implemented at DB-level
* Make sure singleton object cannot be deleted
* Add singleton to admin with disabled permissions for adding or deleting
* Add django-extensions as a requirement to be able to use shell_plus
* Add application year field to sponsorship model
* Display new field and enable filter on sponsorship admin
* Populate application year when creating it
* Rename field to be just "year"
* Enable to filter contract by sponsorship year
* Refactoring to centralize year validators
* Add year field to configure sponsorship benefits and packages
* Initialize values for existing sponsorship benefits and packages with current year
* Year field should be required when creating/editing configured benefits
* Add filter by year to configured benefits and packages
* Refactor configured benefits and packages to build custom manager from queryset
* New manager methods to filter configured packages and benefits from current year
* Sponsorship application form now only lists pkg, benefits, add-ons and a la carte benefits from the current year
* Fix requirements organization
* Improve form unit tests to make sure we're filtering packages and benefits by the current year
* Refactor to encapsulate logic to get the current year within a class method
* Add cache to avoid querying the DB every time the system needs the current year
* Add db index to year fields so querying by them gets faster
* Add migration command to CI to check if it's running them
* Move fields definition to init so query for current year happens as execution time instead of interpretation's one
* Revert "Add migration command to CI to check if it's running them"
This reverts commit 17f7bed.
* add necessary fixtures
* Introduce clone method to benefit and related objects
* Add clone method to be able to copy a benefit configuration to a new benefit
* Make sure Tiered Quantity config can be copy using the same year's package
* Make sure required assets configurations can be cloned without violating db constraints and with valid due dates
* Add unit test to make sure the remaining configuration can be cloned
* Make sure benefit features configurations get cloned as well
* Upgrade model-bakery version to the most up to date with Django 2.2 support
* Implement use case to generate clone an sponsorship year configuration to a
* Introduce helper function to build admin base url name
* Create admin view to clone sponsorship configuration from one year to another
* Add form validation to enforce relations between from and target years
* Add workflow to django admin to enable staff users to clone configurations by year
* Reverse order so most recent years appear first
* Refactoring to introduce more generic function to create django log entries
* Update use case to add django admin log entries for new cloned packages and benefits
* Add parameter to be able to display form for a specific year
* Enable staff user to preview how the application form from a specific year will look like
* Display link to preview non active years sponsorship form in admin
* Only display links to already configured years if they exist
* Also display links to list configured year's packages and benefits from active year list
* Add column with links for the active year
* Disable submit button if preview for custom year
* update style for admin warning on application preview to be extra scary
Co-authored-by: Ee Durbin <[email protected]>
"note": "This flag is used to show the PSF Basic and Advanced member registration process.",
16
+
"created": "2015-06-05T09:47:03Z",
17
+
"modified": "2017-03-22T01:45:42.077Z",
18
+
"groups": [],
19
+
"users": []
20
+
}
21
+
},
22
+
{
23
+
"model": "waffle.flag",
24
+
"pk": 2,
25
+
"fields": {
26
+
"name": "sponsorship-applications-open",
27
+
"everyone": true,
28
+
"percent": null,
29
+
"testing": false,
30
+
"superusers": false,
31
+
"staff": false,
32
+
"authenticated": false,
33
+
"languages": "",
34
+
"rollout": false,
35
+
"note": "Controls if the application form and benefits \"menu\" is visible at https://www.python.org/sponsors/application/\r\n\r\nThe contents of the page when applications are closed is modifiable at https://www.python.org/admin/boxes/box/106/change/",
0 commit comments