diff options
| author | django-bot <ops@djangoproject.com> | 2022-11-26 16:30:44 +0530 |
|---|---|---|
| committer | Paolo Melchiorre <paolo@melchiorre.org> | 2022-11-30 12:54:36 +0100 |
| commit | 3045b338de791118962df4db370411247413eca6 (patch) | |
| tree | bb222ffb7e4b938dfe9e0386c617ad1835a3ded6 /foundation | |
| parent | 40b0da2c241ea471f70eb9c4fbe6da396253f363 (diff) | |
Refs #1184 -- Reformatted code with Black.
Diffstat (limited to 'foundation')
| -rw-r--r-- | foundation/admin.py | 46 | ||||
| -rw-r--r-- | foundation/migrations/0001_initial.py | 808 | ||||
| -rw-r--r-- | foundation/migrations/0002_coreaward_coreawardcohort.py | 81 | ||||
| -rw-r--r-- | foundation/migrations/0003_alter_currencyfields_noop.py | 1244 | ||||
| -rw-r--r-- | foundation/migrations/0004_update_currencies.py | 2 | ||||
| -rw-r--r-- | foundation/models.py | 117 | ||||
| -rw-r--r-- | foundation/templatetags/foundation.py | 29 | ||||
| -rw-r--r-- | foundation/urls/meetings.py | 38 | ||||
| -rw-r--r-- | foundation/views.py | 30 |
9 files changed, 1493 insertions, 902 deletions
diff --git a/foundation/admin.py b/foundation/admin.py index 17a1b521..64212909 100644 --- a/foundation/admin.py +++ b/foundation/admin.py @@ -15,14 +15,15 @@ class TermAdmin(admin.ModelAdmin): @admin.register(models.BoardMember) class BoardMemberAdmin(admin.ModelAdmin): - list_display = ('full_name', 'office', 'term') - list_filter = ('office', 'term') + list_display = ("full_name", "office", "term") + list_filter = ("office", "term") list_select_related = True - raw_id_fields = ('account',) + raw_id_fields = ("account",) def full_name(self, obj): return obj.account.get_full_name() - full_name.admin_order_field = 'account__last_name' + + full_name.admin_order_field = "account__last_name" @admin.register(models.NonBoardAttendee) @@ -53,28 +54,41 @@ class ActionItemInline(admin.StackedInline): @admin.register(models.Meeting) class MeetingAdmin(admin.ModelAdmin): fieldsets = ( - ('Metadata', { - 'fields': ('title', 'slug', 'date', 'leader', 'board_attendees', 'non_board_attendees'), - }), - ('Treasurer report', { - 'fields': ('treasurer_balance', 'treasurer_report'), - }), + ( + "Metadata", + { + "fields": ( + "title", + "slug", + "date", + "leader", + "board_attendees", + "non_board_attendees", + ), + }, + ), + ( + "Treasurer report", + { + "fields": ("treasurer_balance", "treasurer_report"), + }, + ), ) - filter_horizontal = ('board_attendees', 'non_board_attendees') + filter_horizontal = ("board_attendees", "non_board_attendees") inlines = [ GrantInline, IndividualMemberInline, CorporateMemberInline, BusinessInline, - ActionItemInline + ActionItemInline, ] - list_display = ('title', 'date') - list_filter = ('date',) - prepopulated_fields = {'slug': ('title',)} + list_display = ("title", "date") + list_filter = ("date",) + prepopulated_fields = {"slug": ("title",)} class CoreAwardAdmin(admin.ModelAdmin): - list_display = ['recipient', 'cohort'] + list_display = ["recipient", "cohort"] admin.site.register(models.CoreAward, CoreAwardAdmin) diff --git a/foundation/migrations/0001_initial.py b/foundation/migrations/0001_initial.py index a2a1ca58..ae2fa58e 100644 --- a/foundation/migrations/0001_initial.py +++ b/foundation/migrations/0001_initial.py @@ -1,10 +1,11 @@ # Generated by Django 2.1.7 on 2019-04-16 21:54 from decimal import Decimal -from django.conf import settings -from django.db import migrations, models + import django.db.models.deletion import djmoney.models.fields +from django.conf import settings +from django.db import migrations, models class Migration(migrations.Migration): @@ -17,229 +18,704 @@ class Migration(migrations.Migration): operations = [ migrations.CreateModel( - name='ActionItem', + name="ActionItem", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('responsible', models.CharField(max_length=255)), - ('task', models.TextField()), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("responsible", models.CharField(max_length=255)), + ("task", models.TextField()), ], ), migrations.CreateModel( - name='ApprovedCorporateMember', + name="ApprovedCorporateMember", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=255)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("name", models.CharField(max_length=255)), ], ), migrations.CreateModel( - name='ApprovedGrant', + name="ApprovedGrant", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('entity', models.CharField(max_length=255)), - ('amount_currency', djmoney.models.fields.CurrencyField( - choices=[('XUA', 'ADB Unit of Account'), ('AFN', 'Afghani'), ('DZD', 'Algerian Dinar'), ('ARS', 'Argentine Peso'), - ('AMD', 'Armenian Dram'), ('AWG', 'Aruban Guilder'), ('AUD', 'Australian Dollar'), ('AZN', 'Azerbaijanian Manat'), - ('BSD', 'Bahamian Dollar'), ('BHD', 'Bahraini Dinar'), ('THB', 'Baht'), ('PAB', 'Balboa'), ('BBD', 'Barbados Dollar'), - ('BYN', 'Belarussian Ruble'), ('BYR', 'Belarussian Ruble'), ('BZD', 'Belize Dollar'), - ('BMD', 'Bermudian Dollar (customarily known as Bermuda Dollar)'), ('BTN', 'Bhutanese ngultrum'), - ('VEF', 'Bolivar Fuerte'), ('BOB', 'Boliviano'), ('XBA', 'Bond Markets Units European Composite Unit (EURCO)'), - ('BRL', 'Brazilian Real'), ('BND', 'Brunei Dollar'), ('BGN', 'Bulgarian Lev'), ('BIF', 'Burundi Franc'), - ('XOF', 'CFA Franc BCEAO'), ('XAF', 'CFA franc BEAC'), ('XPF', 'CFP Franc'), ('CAD', 'Canadian Dollar'), - ('CVE', 'Cape Verde Escudo'), ('KYD', 'Cayman Islands Dollar'), ('CLP', 'Chilean peso'), - ('XTS', 'Codes specifically reserved for testing purposes'), ('COP', 'Colombian peso'), ('KMF', 'Comoro Franc'), - ('CDF', 'Congolese franc'), ('BAM', 'Convertible Marks'), ('NIO', 'Cordoba Oro'), ('CRC', 'Costa Rican Colon'), - ('HRK', 'Croatian Kuna'), ('CUP', 'Cuban Peso'), ('CUC', 'Cuban convertible peso'), ('CZK', 'Czech Koruna'), ('GMD', 'Dalasi'), - ('DKK', 'Danish Krone'), ('MKD', 'Denar'), ('DJF', 'Djibouti Franc'), ('STD', 'Dobra'), ('DOP', 'Dominican Peso'), - ('VND', 'Dong'), ('XCD', 'East Caribbean Dollar'), ('EGP', 'Egyptian Pound'), ('SVC', 'El Salvador Colon'), - ('ETB', 'Ethiopian Birr'), ('EUR', 'Euro'), ('XBB', 'European Monetary Unit (E.M.U.-6)'), - ('XBD', 'European Unit of Account 17(E.U.A.-17)'), ('XBC', 'European Unit of Account 9(E.U.A.-9)'), - ('FKP', 'Falkland Islands Pound'), ('FJD', 'Fiji Dollar'), ('HUF', 'Forint'), ('GHS', 'Ghana Cedi'), ('GIP', 'Gibraltar Pound'), - ('XAU', 'Gold'), ('XFO', 'Gold-Franc'), ('PYG', 'Guarani'), ('GNF', 'Guinea Franc'), ('GYD', 'Guyana Dollar'), - ('HTG', 'Haitian gourde'), ('HKD', 'Hong Kong Dollar'), ('UAH', 'Hryvnia'), ('ISK', 'Iceland Krona'), ('INR', 'Indian Rupee'), - ('IRR', 'Iranian Rial'), ('IQD', 'Iraqi Dinar'), ('IMP', 'Isle of Man Pound'), ('JMD', 'Jamaican Dollar'), - ('JOD', 'Jordanian Dinar'), ('KES', 'Kenyan Shilling'), ('PGK', 'Kina'), ('LAK', 'Kip'), ('KWD', 'Kuwaiti Dinar'), - ('AOA', 'Kwanza'), ('MMK', 'Kyat'), ('GEL', 'Lari'), ('LVL', 'Latvian Lats'), ('LBP', 'Lebanese Pound'), ('ALL', 'Lek'), - ('HNL', 'Lempira'), ('SLL', 'Leone'), ('LSL', 'Lesotho loti'), ('LRD', 'Liberian Dollar'), ('LYD', 'Libyan Dinar'), - ('SZL', 'Lilangeni'), ('LTL', 'Lithuanian Litas'), ('MGA', 'Malagasy Ariary'), ('MWK', 'Malawian Kwacha'), - ('MYR', 'Malaysian Ringgit'), ('TMM', 'Manat'), ('MUR', 'Mauritius Rupee'), ('MZN', 'Metical'), - ('MXV', 'Mexican Unidad de Inversion (UDI)'), ('MXN', 'Mexican peso'), ('MDL', 'Moldovan Leu'), ('MAD', 'Moroccan Dirham'), - ('BOV', 'Mvdol'), ('NGN', 'Naira'), ('ERN', 'Nakfa'), ('NAD', 'Namibian Dollar'), ('NPR', 'Nepalese Rupee'), - ('ANG', 'Netherlands Antillian Guilder'), ('ILS', 'New Israeli Sheqel'), ('RON', 'New Leu'), ('TWD', 'New Taiwan Dollar'), - ('NZD', 'New Zealand Dollar'), ('KPW', 'North Korean Won'), ('NOK', 'Norwegian Krone'), ('PEN', 'Nuevo Sol'), ('MRO', 'Ouguiya'), - ('TOP', 'Paanga'), ('PKR', 'Pakistan Rupee'), ('XPD', 'Palladium'), ('MOP', 'Pataca'), ('PHP', 'Philippine Peso'), - ('XPT', 'Platinum'), ('GBP', 'Pound Sterling'), ('BWP', 'Pula'), ('QAR', 'Qatari Rial'), ('GTQ', 'Quetzal'), ('ZAR', 'Rand'), - ('OMR', 'Rial Omani'), ('KHR', 'Riel'), ('MVR', 'Rufiyaa'), ('IDR', 'Rupiah'), ('RUB', 'Russian Ruble'), ('RWF', 'Rwanda Franc'), - ('XDR', 'SDR'), ('SHP', 'Saint Helena Pound'), ('SAR', 'Saudi Riyal'), ('RSD', 'Serbian Dinar'), ('SCR', 'Seychelles Rupee'), - ('XAG', 'Silver'), ('SGD', 'Singapore Dollar'), ('SBD', 'Solomon Islands Dollar'), ('KGS', 'Som'), ('SOS', 'Somali Shilling'), - ('TJS', 'Somoni'), ('SSP', 'South Sudanese Pound'), ('LKR', 'Sri Lanka Rupee'), ('XSU', 'Sucre'), ('SDG', 'Sudanese Pound'), - ('SRD', 'Surinam Dollar'), ('SEK', 'Swedish Krona'), ('CHF', 'Swiss Franc'), ('SYP', 'Syrian Pound'), ('BDT', 'Taka'), - ('WST', 'Tala'), ('TZS', 'Tanzanian Shilling'), ('KZT', 'Tenge'), - ('XXX', 'The codes assigned for transactions where no currency is involved'), ('TTD', 'Trinidad and Tobago Dollar'), - ('MNT', 'Tugrik'), ('TND', 'Tunisian Dinar'), ('TRY', 'Turkish Lira'), ('TMT', 'Turkmenistan New Manat'), ('TVD', 'Tuvalu dollar'), - ('AED', 'UAE Dirham'), ('XFU', 'UIC-Franc'), ('USD', 'US Dollar'), ('USN', 'US Dollar (Next day)'), ('UGX', 'Uganda Shilling'), - ('CLF', 'Unidad de Fomento'), ('COU', 'Unidad de Valor Real'), ('UYI', 'Uruguay Peso en Unidades Indexadas (URUIURUI)'), - ('UYU', 'Uruguayan peso'), ('UZS', 'Uzbekistan Sum'), ('VUV', 'Vatu'), ('CHE', 'WIR Euro'), ('CHW', 'WIR Franc'), ('KRW', 'Won'), - ('YER', 'Yemeni Rial'), ('JPY', 'Yen'), ('CNY', 'Yuan Renminbi'), ('ZMK', 'Zambian Kwacha'), ('ZMW', 'Zambian Kwacha'), - ('ZWD', 'Zimbabwe Dollar A/06'), ('ZWN', 'Zimbabwe dollar A/08'), ('ZWL', 'Zimbabwe dollar A/09'), ('PLN', 'Zloty')], - default='USD', editable=False, max_length=3)), - ('amount', djmoney.models.fields.MoneyField(decimal_places=2, default=Decimal('0.0'), default_currency='USD', max_digits=10)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("entity", models.CharField(max_length=255)), + ( + "amount_currency", + djmoney.models.fields.CurrencyField( + choices=[ + ("XUA", "ADB Unit of Account"), + ("AFN", "Afghani"), + ("DZD", "Algerian Dinar"), + ("ARS", "Argentine Peso"), + ("AMD", "Armenian Dram"), + ("AWG", "Aruban Guilder"), + ("AUD", "Australian Dollar"), + ("AZN", "Azerbaijanian Manat"), + ("BSD", "Bahamian Dollar"), + ("BHD", "Bahraini Dinar"), + ("THB", "Baht"), + ("PAB", "Balboa"), + ("BBD", "Barbados Dollar"), + ("BYN", "Belarussian Ruble"), + ("BYR", "Belarussian Ruble"), + ("BZD", "Belize Dollar"), + ( + "BMD", + "Bermudian Dollar (customarily known as Bermuda Dollar)", + ), + ("BTN", "Bhutanese ngultrum"), + ("VEF", "Bolivar Fuerte"), + ("BOB", "Boliviano"), + ( + "XBA", + "Bond Markets Units European Composite Unit (EURCO)", + ), + ("BRL", "Brazilian Real"), + ("BND", "Brunei Dollar"), + ("BGN", "Bulgarian Lev"), + ("BIF", "Burundi Franc"), + ("XOF", "CFA Franc BCEAO"), + ("XAF", "CFA franc BEAC"), + ("XPF", "CFP Franc"), + ("CAD", "Canadian Dollar"), + ("CVE", "Cape Verde Escudo"), + ("KYD", "Cayman Islands Dollar"), + ("CLP", "Chilean peso"), + ("XTS", "Codes specifically reserved for testing purposes"), + ("COP", "Colombian peso"), + ("KMF", "Comoro Franc"), + ("CDF", "Congolese franc"), + ("BAM", "Convertible Marks"), + ("NIO", "Cordoba Oro"), + ("CRC", "Costa Rican Colon"), + ("HRK", "Croatian Kuna"), + ("CUP", "Cuban Peso"), + ("CUC", "Cuban convertible peso"), + ("CZK", "Czech Koruna"), + ("GMD", "Dalasi"), + ("DKK", "Danish Krone"), + ("MKD", "Denar"), + ("DJF", "Djibouti Franc"), + ("STD", "Dobra"), + ("DOP", "Dominican Peso"), + ("VND", "Dong"), + ("XCD", "East Caribbean Dollar"), + ("EGP", "Egyptian Pound"), + ("SVC", "El Salvador Colon"), + ("ETB", "Ethiopian Birr"), + ("EUR", "Euro"), + ("XBB", "European Monetary Unit (E.M.U.-6)"), + ("XBD", "European Unit of Account 17(E.U.A.-17)"), + ("XBC", "European Unit of Account 9(E.U.A.-9)"), + ("FKP", "Falkland Islands Pound"), + ("FJD", "Fiji Dollar"), + ("HUF", "Forint"), + ("GHS", "Ghana Cedi"), + ("GIP", "Gibraltar Pound"), + ("XAU", "Gold"), + ("XFO", "Gold-Franc"), + ("PYG", "Guarani"), + ("GNF", "Guinea Franc"), + ("GYD", "Guyana Dollar"), + ("HTG", "Haitian gourde"), + ("HKD", "Hong Kong Dollar"), + ("UAH", "Hryvnia"), + ("ISK", "Iceland Krona"), + ("INR", "Indian Rupee"), + ("IRR", "Iranian Rial"), + ("IQD", "Iraqi Dinar"), + ("IMP", "Isle of Man Pound"), + ("JMD", "Jamaican Dollar"), + ("JOD", "Jordanian Dinar"), + ("KES", "Kenyan Shilling"), + ("PGK", "Kina"), + ("LAK", "Kip"), + ("KWD", "Kuwaiti Dinar"), + ("AOA", "Kwanza"), + ("MMK", "Kyat"), + ("GEL", "Lari"), + ("LVL", "Latvian Lats"), + ("LBP", "Lebanese Pound"), + ("ALL", "Lek"), + ("HNL", "Lempira"), + ("SLL", "Leone"), + ("LSL", "Lesotho loti"), + ("LRD", "Liberian Dollar"), + ("LYD", "Libyan Dinar"), + ("SZL", "Lilangeni"), + ("LTL", "Lithuanian Litas"), + ("MGA", "Malagasy Ariary"), + ("MWK", "Malawian Kwacha"), + ("MYR", "Malaysian Ringgit"), + ("TMM", "Manat"), + ("MUR", "Mauritius Rupee"), + ("MZN", "Metical"), + ("MXV", "Mexican Unidad de Inversion (UDI)"), + ("MXN", "Mexican peso"), + ("MDL", "Moldovan Leu"), + ("MAD", "Moroccan Dirham"), + ("BOV", "Mvdol"), + ("NGN", "Naira"), + ("ERN", "Nakfa"), + ("NAD", "Namibian Dollar"), + ("NPR", "Nepalese Rupee"), + ("ANG", "Netherlands Antillian Guilder"), + ("ILS", "New Israeli Sheqel"), + ("RON", "New Leu"), + ("TWD", "New Taiwan Dollar"), + ("NZD", "New Zealand Dollar"), + ("KPW", "North Korean Won"), + ("NOK", "Norwegian Krone"), + ("PEN", "Nuevo Sol"), + ("MRO", "Ouguiya"), + ("TOP", "Paanga"), + ("PKR", "Pakistan Rupee"), + ("XPD", "Palladium"), + ("MOP", "Pataca"), + ("PHP", "Philippine Peso"), + ("XPT", "Platinum"), + ("GBP", "Pound Sterling"), + ("BWP", "Pula"), + ("QAR", "Qatari Rial"), + ("GTQ", "Quetzal"), + ("ZAR", "Rand"), + ("OMR", "Rial Omani"), + ("KHR", "Riel"), + ("MVR", "Rufiyaa"), + ("IDR", "Rupiah"), + ("RUB", "Russian Ruble"), + ("RWF", "Rwanda Franc"), + ("XDR", "SDR"), + ("SHP", "Saint Helena Pound"), + ("SAR", "Saudi Riyal"), + ("RSD", "Serbian Dinar"), + ("SCR", "Seychelles Rupee"), + ("XAG", "Silver"), + ("SGD", "Singapore Dollar"), + ("SBD", "Solomon Islands Dollar"), + ("KGS", "Som"), + ("SOS", "Somali Shilling"), + ("TJS", "Somoni"), + ("SSP", "South Sudanese Pound"), + ("LKR", "Sri Lanka Rupee"), + ("XSU", "Sucre"), + ("SDG", "Sudanese Pound"), + ("SRD", "Surinam Dollar"), + ("SEK", "Swedish Krona"), + ("CHF", "Swiss Franc"), + ("SYP", "Syrian Pound"), + ("BDT", "Taka"), + ("WST", "Tala"), + ("TZS", "Tanzanian Shilling"), + ("KZT", "Tenge"), + ( + "XXX", + "The codes assigned for transactions where no currency is involved", + ), + ("TTD", "Trinidad and Tobago Dollar"), + ("MNT", "Tugrik"), + ("TND", "Tunisian Dinar"), + ("TRY", "Turkish Lira"), + ("TMT", "Turkmenistan New Manat"), + ("TVD", "Tuvalu dollar"), + ("AED", "UAE Dirham"), + ("XFU", "UIC-Franc"), + ("USD", "US Dollar"), + ("USN", "US Dollar (Next day)"), + ("UGX", "Uganda Shilling"), + ("CLF", "Unidad de Fomento"), + ("COU", "Unidad de Valor Real"), + ("UYI", "Uruguay Peso en Unidades Indexadas (URUIURUI)"), + ("UYU", "Uruguayan peso"), + ("UZS", "Uzbekistan Sum"), + ("VUV", "Vatu"), + ("CHE", "WIR Euro"), + ("CHW", "WIR Franc"), + ("KRW", "Won"), + ("YER", "Yemeni Rial"), + ("JPY", "Yen"), + ("CNY", "Yuan Renminbi"), + ("ZMK", "Zambian Kwacha"), + ("ZMW", "Zambian Kwacha"), + ("ZWD", "Zimbabwe Dollar A/06"), + ("ZWN", "Zimbabwe dollar A/08"), + ("ZWL", "Zimbabwe dollar A/09"), + ("PLN", "Zloty"), + ], + default="USD", + editable=False, + max_length=3, + ), + ), + ( + "amount", + djmoney.models.fields.MoneyField( + decimal_places=2, + default=Decimal("0.0"), + default_currency="USD", + max_digits=10, + ), + ), ], options={ - 'ordering': ('entity',), + "ordering": ("entity",), }, ), migrations.CreateModel( - name='ApprovedIndividualMember', + name="ApprovedIndividualMember", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=255)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("name", models.CharField(max_length=255)), ], ), migrations.CreateModel( - name='BoardMember', + name="BoardMember", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ( + "account", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + to=settings.AUTH_USER_MODEL, + ), + ), ], ), migrations.CreateModel( - name='Business', + name="Business", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=255)), - ('body', models.TextField()), - ('body_html', models.TextField(editable=False)), - ('business_type', models.CharField(choices=[('new', 'New'), ('ongoing', 'Ongoing')], max_length=25)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("title", models.CharField(max_length=255)), + ("body", models.TextField()), + ("body_html", models.TextField(editable=False)), + ( + "business_type", + models.CharField( + choices=[("new", "New"), ("ongoing", "Ongoing")], max_length=25 + ), + ), ], options={ - 'verbose_name_plural': 'Business', - 'ordering': ('title',), + "verbose_name_plural": "Business", + "ordering": ("title",), }, ), migrations.CreateModel( - name='Meeting', + name="Meeting", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField()), - ('title', models.CharField(max_length=255)), - ('slug', models.SlugField()), - ('treasurer_balance_currency', djmoney.models.fields.CurrencyField( - choices=[('XUA', 'ADB Unit of Account'), ('AFN', 'Afghani'), ('DZD', 'Algerian Dinar'), ('ARS', 'Argentine Peso'), - ('AMD', 'Armenian Dram'), ('AWG', 'Aruban Guilder'), ('AUD', 'Australian Dollar'), ('AZN', 'Azerbaijanian Manat'), - ('BSD', 'Bahamian Dollar'), ('BHD', 'Bahraini Dinar'), ('THB', 'Baht'), ('PAB', 'Balboa'), ('BBD', 'Barbados Dollar'), - ('BYN', 'Belarussian Ruble'), ('BYR', 'Belarussian Ruble'), ('BZD', 'Belize Dollar'), - ('BMD', 'Bermudian Dollar (customarily known as Bermuda Dollar)'), ('BTN', 'Bhutanese ngultrum'), - ('VEF', 'Bolivar Fuerte'), ('BOB', 'Boliviano'), ('XBA', 'Bond Markets Units European Composite Unit (EURCO)'), - ('BRL', 'Brazilian Real'), ('BND', 'Brunei Dollar'), ('BGN', 'Bulgarian Lev'), ('BIF', 'Burundi Franc'), - ('XOF', 'CFA Franc BCEAO'), ('XAF', 'CFA franc BEAC'), ('XPF', 'CFP Franc'), ('CAD', 'Canadian Dollar'), - ('CVE', 'Cape Verde Escudo'), ('KYD', 'Cayman Islands Dollar'), ('CLP', 'Chilean peso'), - ('XTS', 'Codes specifically reserved for testing purposes'), ('COP', 'Colombian peso'), ('KMF', 'Comoro Franc'), - ('CDF', 'Congolese franc'), ('BAM', 'Convertible Marks'), ('NIO', 'Cordoba Oro'), ('CRC', 'Costa Rican Colon'), - ('HRK', 'Croatian Kuna'), ('CUP', 'Cuban Peso'), ('CUC', 'Cuban convertible peso'), ('CZK', 'Czech Koruna'), ('GMD', 'Dalasi'), - ('DKK', 'Danish Krone'), ('MKD', 'Denar'), ('DJF', 'Djibouti Franc'), ('STD', 'Dobra'), ('DOP', 'Dominican Peso'), - ('VND', 'Dong'), ('XCD', 'East Caribbean Dollar'), ('EGP', 'Egyptian Pound'), ('SVC', 'El Salvador Colon'), - ('ETB', 'Ethiopian Birr'), ('EUR', 'Euro'), ('XBB', 'European Monetary Unit (E.M.U.-6)'), - ('XBD', 'European Unit of Account 17(E.U.A.-17)'), ('XBC', 'European Unit of Account 9(E.U.A.-9)'), - ('FKP', 'Falkland Islands Pound'), ('FJD', 'Fiji Dollar'), ('HUF', 'Forint'), ('GHS', 'Ghana Cedi'), ('GIP', 'Gibraltar Pound'), - ('XAU', 'Gold'), ('XFO', 'Gold-Franc'), ('PYG', 'Guarani'), ('GNF', 'Guinea Franc'), ('GYD', 'Guyana Dollar'), - ('HTG', 'Haitian gourde'), ('HKD', 'Hong Kong Dollar'), ('UAH', 'Hryvnia'), ('ISK', 'Iceland Krona'), ('INR', 'Indian Rupee'), - ('IRR', 'Iranian Rial'), ('IQD', 'Iraqi Dinar'), ('IMP', 'Isle of Man Pound'), ('JMD', 'Jamaican Dollar'), - ('JOD', 'Jordanian Dinar'), ('KES', 'Kenyan Shilling'), ('PGK', 'Kina'), ('LAK', 'Kip'), ('KWD', 'Kuwaiti Dinar'), - ('AOA', 'Kwanza'), ('MMK', 'Kyat'), ('GEL', 'Lari'), ('LVL', 'Latvian Lats'), ('LBP', 'Lebanese Pound'), ('ALL', 'Lek'), - ('HNL', 'Lempira'), ('SLL', 'Leone'), ('LSL', 'Lesotho loti'), ('LRD', 'Liberian Dollar'), ('LYD', 'Libyan Dinar'), - ('SZL', 'Lilangeni'), ('LTL', 'Lithuanian Litas'), ('MGA', 'Malagasy Ariary'), ('MWK', 'Malawian Kwacha'), - ('MYR', 'Malaysian Ringgit'), ('TMM', 'Manat'), ('MUR', 'Mauritius Rupee'), ('MZN', 'Metical'), - ('MXV', 'Mexican Unidad de Inversion (UDI)'), ('MXN', 'Mexican peso'), ('MDL', 'Moldovan Leu'), ('MAD', 'Moroccan Dirham'), - ('BOV', 'Mvdol'), ('NGN', 'Naira'), ('ERN', 'Nakfa'), ('NAD', 'Namibian Dollar'), ('NPR', 'Nepalese Rupee'), - ('ANG', 'Netherlands Antillian Guilder'), ('ILS', 'New Israeli Sheqel'), ('RON', 'New Leu'), ('TWD', 'New Taiwan Dollar'), - ('NZD', 'New Zealand Dollar'), ('KPW', 'North Korean Won'), ('NOK', 'Norwegian Krone'), ('PEN', 'Nuevo Sol'), ('MRO', 'Ouguiya'), - ('TOP', 'Paanga'), ('PKR', 'Pakistan Rupee'), ('XPD', 'Palladium'), ('MOP', 'Pataca'), ('PHP', 'Philippine Peso'), - ('XPT', 'Platinum'), ('GBP', 'Pound Sterling'), ('BWP', 'Pula'), ('QAR', 'Qatari Rial'), ('GTQ', 'Quetzal'), ('ZAR', 'Rand'), - ('OMR', 'Rial Omani'), ('KHR', 'Riel'), ('MVR', 'Rufiyaa'), ('IDR', 'Rupiah'), ('RUB', 'Russian Ruble'), ('RWF', 'Rwanda Franc'), - ('XDR', 'SDR'), ('SHP', 'Saint Helena Pound'), ('SAR', 'Saudi Riyal'), ('RSD', 'Serbian Dinar'), ('SCR', 'Seychelles Rupee'), - ('XAG', 'Silver'), ('SGD', 'Singapore Dollar'), ('SBD', 'Solomon Islands Dollar'), ('KGS', 'Som'), ('SOS', 'Somali Shilling'), - ('TJS', 'Somoni'), ('SSP', 'South Sudanese Pound'), ('LKR', 'Sri Lanka Rupee'), ('XSU', 'Sucre'), ('SDG', 'Sudanese Pound'), - ('SRD', 'Surinam Dollar'), ('SEK', 'Swedish Krona'), ('CHF', 'Swiss Franc'), ('SYP', 'Syrian Pound'), ('BDT', 'Taka'), - ('WST', 'Tala'), ('TZS', 'Tanzanian Shilling'), ('KZT', 'Tenge'), - ('XXX', 'The codes assigned for transactions where no currency is involved'), ('TTD', 'Trinidad and Tobago Dollar'), - ('MNT', 'Tugrik'), ('TND', 'Tunisian Dinar'), ('TRY', 'Turkish Lira'), ('TMT', 'Turkmenistan New Manat'), ('TVD', 'Tuvalu dollar'), - ('AED', 'UAE Dirham'), ('XFU', 'UIC-Franc'), ('USD', 'US Dollar'), ('USN', 'US Dollar (Next day)'), ('UGX', 'Uganda Shilling'), - ('CLF', 'Unidad de Fomento'), ('COU', 'Unidad de Valor Real'), ('UYI', 'Uruguay Peso en Unidades Indexadas (URUIURUI)'), - ('UYU', 'Uruguayan peso'), ('UZS', 'Uzbekistan Sum'), ('VUV', 'Vatu'), ('CHE', 'WIR Euro'), ('CHW', 'WIR Franc'), ('KRW', 'Won'), - ('YER', 'Yemeni Rial'), ('JPY', 'Yen'), ('CNY', 'Yuan Renminbi'), ('ZMK', 'Zambian Kwacha'), ('ZMW', 'Zambian Kwacha'), - ('ZWD', 'Zimbabwe Dollar A/06'), ('ZWN', 'Zimbabwe dollar A/08'), ('ZWL', 'Zimbabwe dollar A/09'), ('PLN', 'Zloty')], - default='USD', editable=False, max_length=3)), - ('treasurer_balance', djmoney.models.fields.MoneyField(decimal_places=2, default=Decimal('0.0'), default_currency='USD', max_digits=10)), - ('treasurer_report', models.TextField(blank=True)), - ('treasurer_report_html', models.TextField(editable=False)), - ('board_attendees', models.ManyToManyField(related_name='meetings_attended', to='foundation.BoardMember')), - ('leader', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='meetings_led', to='foundation.BoardMember')), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("date", models.DateField()), + ("title", models.CharField(max_length=255)), + ("slug", models.SlugField()), + ( + "treasurer_balance_currency", + djmoney.models.fields.CurrencyField( + choices=[ + ("XUA", "ADB Unit of Account"), + ("AFN", "Afghani"), + ("DZD", "Algerian Dinar"), + ("ARS", "Argentine Peso"), + ("AMD", "Armenian Dram"), + ("AWG", "Aruban Guilder"), + ("AUD", "Australian Dollar"), + ("AZN", "Azerbaijanian Manat"), + ("BSD", "Bahamian Dollar"), + ("BHD", "Bahraini Dinar"), + ("THB", "Baht"), + ("PAB", "Balboa"), + ("BBD", "Barbados Dollar"), + ("BYN", "Belarussian Ruble"), + ("BYR", "Belarussian Ruble"), + ("BZD", "Belize Dollar"), + ( + "BMD", + "Bermudian Dollar (customarily known as Bermuda Dollar)", + ), + ("BTN", "Bhutanese ngultrum"), + ("VEF", "Bolivar Fuerte"), + ("BOB", "Boliviano"), + ( + "XBA", + "Bond Markets Units European Composite Unit (EURCO)", + ), + ("BRL", "Brazilian Real"), + ("BND", "Brunei Dollar"), + ("BGN", "Bulgarian Lev"), + ("BIF", "Burundi Franc"), + ("XOF", "CFA Franc BCEAO"), + ("XAF", "CFA franc BEAC"), + ("XPF", "CFP Franc"), + ("CAD", "Canadian Dollar"), + ("CVE", "Cape Verde Escudo"), + ("KYD", "Cayman Islands Dollar"), + ("CLP", "Chilean peso"), + ("XTS", "Codes specifically reserved for testing purposes"), + ("COP", "Colombian peso"), + ("KMF", "Comoro Franc"), + ("CDF", "Congolese franc"), + ("BAM", "Convertible Marks"), + ("NIO", "Cordoba Oro"), + ("CRC", "Costa Rican Colon"), + ("HRK", "Croatian Kuna"), + ("CUP", "Cuban Peso"), + ("CUC", "Cuban convertible peso"), + ("CZK", "Czech Koruna"), + ("GMD", "Dalasi"), + ("DKK", "Danish Krone"), + ("MKD", "Denar"), + ("DJF", "Djibouti Franc"), + ("STD", "Dobra"), + ("DOP", "Dominican Peso"), + ("VND", "Dong"), + ("XCD", "East Caribbean Dollar"), + ("EGP", "Egyptian Pound"), + ("SVC", "El Salvador Colon"), + ("ETB", "Ethiopian Birr"), + ("EUR", "Euro"), + ("XBB", "European Monetary Unit (E.M.U.-6)"), + ("XBD", "European Unit of Account 17(E.U.A.-17)"), + ("XBC", "European Unit of Account 9(E.U.A.-9)"), + ("FKP", "Falkland Islands Pound"), + ("FJD", "Fiji Dollar"), + ("HUF", "Forint"), + ("GHS", "Ghana Cedi"), + ("GIP", "Gibraltar Pound"), + ("XAU", "Gold"), + ("XFO", "Gold-Franc"), + ("PYG", "Guarani"), + ("GNF", "Guinea Franc"), + ("GYD", "Guyana Dollar"), + ("HTG", "Haitian gourde"), + ("HKD", "Hong Kong Dollar"), + ("UAH", "Hryvnia"), + ("ISK", "Iceland Krona"), + ("INR", "Indian Rupee"), + ("IRR", "Iranian Rial"), + ("IQD", "Iraqi Dinar"), + ("IMP", "Isle of Man Pound"), + ("JMD", "Jamaican Dollar"), + ("JOD", "Jordanian Dinar"), + ("KES", "Kenyan Shilling"), + ("PGK", "Kina"), + ("LAK", "Kip"), + ("KWD", "Kuwaiti Dinar"), + ("AOA", "Kwanza"), + ("MMK", "Kyat"), + ("GEL", "Lari"), + ("LVL", "Latvian Lats"), + ("LBP", "Lebanese Pound"), + ("ALL", "Lek"), + ("HNL", "Lempira"), + ("SLL", "Leone"), + ("LSL", "Lesotho loti"), + ("LRD", "Liberian Dollar"), + ("LYD", "Libyan Dinar"), + ("SZL", "Lilangeni"), + ("LTL", "Lithuanian Litas"), + ("MGA", "Malagasy Ariary"), + ("MWK", "Malawian Kwacha"), + ("MYR", "Malaysian Ringgit"), + ("TMM", "Manat"), + ("MUR", "Mauritius Rupee"), + ("MZN", "Metical"), + ("MXV", "Mexican Unidad de Inversion (UDI)"), + ("MXN", "Mexican peso"), + ("MDL", "Moldovan Leu"), + ("MAD", "Moroccan Dirham"), + ("BOV", "Mvdol"), + ("NGN", "Naira"), + ("ERN", "Nakfa"), + ("NAD", "Namibian Dollar"), + ("NPR", "Nepalese Rupee"), + ("ANG", "Netherlands Antillian Guilder"), + ("ILS", "New Israeli Sheqel"), + ("RON", "New Leu"), + ("TWD", "New Taiwan Dollar"), + ("NZD", "New Zealand Dollar"), + ("KPW", "North Korean Won"), + ("NOK", "Norwegian Krone"), + ("PEN", "Nuevo Sol"), + ("MRO", "Ouguiya"), + ("TOP", "Paanga"), + ("PKR", "Pakistan Rupee"), + ("XPD", "Palladium"), + ("MOP", "Pataca"), + ("PHP", "Philippine Peso"), + ("XPT", "Platinum"), + ("GBP", "Pound Sterling"), + ("BWP", "Pula"), + ("QAR", "Qatari Rial"), + ("GTQ", "Quetzal"), + ("ZAR", "Rand"), + ("OMR", "Rial Omani"), + ("KHR", "Riel"), + ("MVR", "Rufiyaa"), + ("IDR", "Rupiah"), + ("RUB", "Russian Ruble"), + ("RWF", "Rwanda Franc"), + ("XDR", "SDR"), + ("SHP", "Saint Helena Pound"), + ("SAR", "Saudi Riyal"), + ("RSD", "Serbian Dinar"), + ("SCR", "Seychelles Rupee"), + ("XAG", "Silver"), + ("SGD", "Singapore Dollar"), + ("SBD", "Solomon Islands Dollar"), + ("KGS", "Som"), + ("SOS", "Somali Shilling"), + ("TJS", "Somoni"), + ("SSP", "South Sudanese Pound"), + ("LKR", "Sri Lanka Rupee"), + ("XSU", "Sucre"), + ("SDG", "Sudanese Pound"), + ("SRD", "Surinam Dollar"), + ("SEK", "Swedish Krona"), + ("CHF", "Swiss Franc"), + ("SYP", "Syrian Pound"), + ("BDT", "Taka"), + ("WST", "Tala"), + ("TZS", "Tanzanian Shilling"), + ("KZT", "Tenge"), + ( + "XXX", + "The codes assigned for transactions where no currency is involved", + ), + ("TTD", "Trinidad and Tobago Dollar"), + ("MNT", "Tugrik"), + ("TND", "Tunisian Dinar"), + ("TRY", "Turkish Lira"), + ("TMT", "Turkmenistan New Manat"), + ("TVD", "Tuvalu dollar"), + ("AED", "UAE Dirham"), + ("XFU", "UIC-Franc"), + ("USD", "US Dollar"), + ("USN", "US Dollar (Next day)"), + ("UGX", "Uganda Shilling"), + ("CLF", "Unidad de Fomento"), + ("COU", "Unidad de Valor Real"), + ("UYI", "Uruguay Peso en Unidades Indexadas (URUIURUI)"), + ("UYU", "Uruguayan peso"), + ("UZS", "Uzbekistan Sum"), + ("VUV", "Vatu"), + ("CHE", "WIR Euro"), + ("CHW", "WIR Franc"), + ("KRW", "Won"), + ("YER", "Yemeni Rial"), + ("JPY", "Yen"), + ("CNY", "Yuan Renminbi"), + ("ZMK", "Zambian Kwacha"), + ("ZMW", "Zambian Kwacha"), + ("ZWD", "Zimbabwe Dollar A/06"), + ("ZWN", "Zimbabwe dollar A/08"), + ("ZWL", "Zimbabwe dollar A/09"), + ("PLN", "Zloty"), + ], + default="USD", + editable=False, + max_length=3, + ), + ), + ( + "treasurer_balance", + djmoney.models.fields.MoneyField( + decimal_places=2, + default=Decimal("0.0"), + default_currency="USD", + max_digits=10, + ), + ), + ("treasurer_report", models.TextField(blank=True)), + ("treasurer_report_html", models.TextField(editable=False)), + ( + "board_attendees", + models.ManyToManyField( + related_name="meetings_attended", to="foundation.BoardMember" + ), + ), + ( + "leader", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="meetings_led", + to="foundation.BoardMember", + ), + ), ], ), migrations.CreateModel( - name='NonBoardAttendee', + name="NonBoardAttendee", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=255)), - ('role', models.CharField(max_length=100)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("name", models.CharField(max_length=255)), + ("role", models.CharField(max_length=100)), ], options={ - 'verbose_name': 'Non-board attendee', - 'verbose_name_plural': 'Non-board attendees', + "verbose_name": "Non-board attendee", + "verbose_name_plural": "Non-board attendees", }, ), migrations.CreateModel( - name='Office', + name="Office", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=100, unique=True)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("name", models.CharField(max_length=100, unique=True)), ], ), migrations.CreateModel( - name='Term', + name="Term", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('year', models.CharField(max_length=4, unique=True)), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("year", models.CharField(max_length=4, unique=True)), ], ), migrations.AddField( - model_name='meeting', - name='non_board_attendees', - field=models.ManyToManyField(blank=True, related_name='meetings_attended', to='foundation.NonBoardAttendee'), + model_name="meeting", + name="non_board_attendees", + field=models.ManyToManyField( + blank=True, + related_name="meetings_attended", + to="foundation.NonBoardAttendee", + ), ), migrations.AddField( - model_name='business', - name='meeting', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='business', to='foundation.Meeting'), + model_name="business", + name="meeting", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="business", + to="foundation.Meeting", + ), ), migrations.AddField( - model_name='boardmember', - name='office', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='holders', to='foundation.Office'), + model_name="boardmember", + name="office", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="holders", + to="foundation.Office", + ), ), migrations.AddField( - model_name='boardmember', - name='term', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='board_members', to='foundation.Term'), + model_name="boardmember", + name="term", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="board_members", + to="foundation.Term", + ), ), migrations.AddField( - model_name='approvedindividualmember', - name='approved_at', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='individual_members_approved', to='foundation.Meeting'), + model_name="approvedindividualmember", + name="approved_at", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="individual_members_approved", + to="foundation.Meeting", + ), ), migrations.AddField( - model_name='approvedgrant', - name='approved_at', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='grants_approved', to='foundation.Meeting'), + model_name="approvedgrant", + name="approved_at", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="grants_approved", + to="foundation.Meeting", + ), ), migrations.AddField( - model_name='approvedcorporatemember', - name='approved_at', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='corporate_members_approved', to='foundation.Meeting'), + model_name="approvedcorporatemember", + name="approved_at", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="corporate_members_approved", + to="foundation.Meeting", + ), ), migrations.AddField( - model_name='actionitem', - name='meeting', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='action_items', to='foundation.Meeting'), + model_name="actionitem", + name="meeting", + field=models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="action_items", + to="foundation.Meeting", + ), ), ] diff --git a/foundation/migrations/0002_coreaward_coreawardcohort.py b/foundation/migrations/0002_coreaward_coreawardcohort.py index 8f28a285..ad93ed90 100644 --- a/foundation/migrations/0002_coreaward_coreawardcohort.py +++ b/foundation/migrations/0002_coreaward_coreawardcohort.py @@ -1,36 +1,89 @@ # Generated by Django 2.2.24 on 2021-06-09 04:03 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('foundation', '0001_initial'), + ("foundation", "0001_initial"), ] operations = [ migrations.CreateModel( - name='CoreAwardCohort', + name="CoreAwardCohort", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(help_text="Name for the group being inducted, e.g. 'Q1 2021'", max_length=255, unique=True)), - ('description', models.TextField(blank=True)), - ('cohort_date', models.DateField(help_text='Date this cohort was approved by the DSF Board')), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ( + "name", + models.CharField( + help_text="Name for the group being inducted, e.g. 'Q1 2021'", + max_length=255, + unique=True, + ), + ), + ("description", models.TextField(blank=True)), + ( + "cohort_date", + models.DateField( + help_text="Date this cohort was approved by the DSF Board" + ), + ), ], ), migrations.CreateModel( - name='CoreAward', + name="CoreAward", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('recipient', models.CharField(help_text="Recipient's name", max_length=1023, unique=True)), - ('link', models.URLField(blank=True, help_text='Optional link for this recipient', null=True)), - ('description', models.TextField(blank=True, help_text='Optional one-paragraph description/bio of why this person received the award')), - ('cohort', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='recipients', to='foundation.CoreAwardCohort')), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ( + "recipient", + models.CharField( + help_text="Recipient's name", max_length=1023, unique=True + ), + ), + ( + "link", + models.URLField( + blank=True, + help_text="Optional link for this recipient", + null=True, + ), + ), + ( + "description", + models.TextField( + blank=True, + help_text="Optional one-paragraph description/bio of why this person received the award", + ), + ), + ( + "cohort", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="recipients", + to="foundation.CoreAwardCohort", + ), + ), ], options={ - 'ordering': ['recipient'], + "ordering": ["recipient"], }, ), ] diff --git a/foundation/migrations/0003_alter_currencyfields_noop.py b/foundation/migrations/0003_alter_currencyfields_noop.py index cb2c6d07..a766c0c1 100644 --- a/foundation/migrations/0003_alter_currencyfields_noop.py +++ b/foundation/migrations/0003_alter_currencyfields_noop.py @@ -1,650 +1,650 @@ -from django.db import migrations import djmoney.models.fields +from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('foundation', '0002_coreaward_coreawardcohort'), + ("foundation", "0002_coreaward_coreawardcohort"), ] operations = [ migrations.AlterField( - model_name='approvedgrant', - name='amount_currency', + model_name="approvedgrant", + name="amount_currency", field=djmoney.models.fields.CurrencyField( choices=[ - ('XUA', 'ADB Unit of Account'), - ('AFN', 'Afghan Afghani'), - ('AFA', 'Afghan Afghani (1927–2002)'), - ('ALL', 'Albanian Lek'), - ('ALK', 'Albanian Lek (1946–1965)'), - ('DZD', 'Algerian Dinar'), - ('ADP', 'Andorran Peseta'), - ('AOA', 'Angolan Kwanza'), - ('AOK', 'Angolan Kwanza (1977–1991)'), - ('AON', 'Angolan New Kwanza (1990–2000)'), - ('AOR', 'Angolan Readjusted Kwanza (1995–1999)'), - ('ARA', 'Argentine Austral'), - ('ARS', 'Argentine Peso'), - ('ARM', 'Argentine Peso (1881–1970)'), - ('ARP', 'Argentine Peso (1983–1985)'), - ('ARL', 'Argentine Peso Ley (1970–1983)'), - ('AMD', 'Armenian Dram'), - ('AWG', 'Aruban Florin'), - ('AUD', 'Australian Dollar'), - ('ATS', 'Austrian Schilling'), - ('AZN', 'Azerbaijani Manat'), - ('AZM', 'Azerbaijani Manat (1993–2006)'), - ('BSD', 'Bahamian Dollar'), - ('BHD', 'Bahraini Dinar'), - ('BDT', 'Bangladeshi Taka'), - ('BBD', 'Barbadian Dollar'), - ('BYN', 'Belarusian Ruble'), - ('BYB', 'Belarusian Ruble (1994–1999)'), - ('BYR', 'Belarusian Ruble (2000–2016)'), - ('BEF', 'Belgian Franc'), - ('BEC', 'Belgian Franc (convertible)'), - ('BEL', 'Belgian Franc (financial)'), - ('BZD', 'Belize Dollar'), - ('BMD', 'Bermudan Dollar'), - ('BTN', 'Bhutanese Ngultrum'), - ('BOB', 'Bolivian Boliviano'), - ('BOL', 'Bolivian Boliviano (1863–1963)'), - ('BOV', 'Bolivian Mvdol'), - ('BOP', 'Bolivian Peso'), - ('BAM', 'Bosnia-Herzegovina Convertible Mark'), - ('BAD', 'Bosnia-Herzegovina Dinar (1992–1994)'), - ('BAN', 'Bosnia-Herzegovina New Dinar (1994–1997)'), - ('BWP', 'Botswanan Pula'), - ('BRC', 'Brazilian Cruzado (1986–1989)'), - ('BRZ', 'Brazilian Cruzeiro (1942–1967)'), - ('BRE', 'Brazilian Cruzeiro (1990–1993)'), - ('BRR', 'Brazilian Cruzeiro (1993–1994)'), - ('BRN', 'Brazilian New Cruzado (1989–1990)'), - ('BRB', 'Brazilian New Cruzeiro (1967–1986)'), - ('BRL', 'Brazilian Real'), - ('GBP', 'British Pound'), - ('BND', 'Brunei Dollar'), - ('BGL', 'Bulgarian Hard Lev'), - ('BGN', 'Bulgarian Lev'), - ('BGO', 'Bulgarian Lev (1879–1952)'), - ('BGM', 'Bulgarian Socialist Lev'), - ('BUK', 'Burmese Kyat'), - ('BIF', 'Burundian Franc'), - ('XPF', 'CFP Franc'), - ('KHR', 'Cambodian Riel'), - ('CAD', 'Canadian Dollar'), - ('CVE', 'Cape Verdean Escudo'), - ('KYD', 'Cayman Islands Dollar'), - ('XAF', 'Central African CFA Franc'), - ('CLE', 'Chilean Escudo'), - ('CLP', 'Chilean Peso'), - ('CLF', 'Chilean Unit of Account (UF)'), - ('CNX', 'Chinese People’s Bank Dollar'), - ('CNY', 'Chinese Yuan'), - ('CNH', 'Chinese Yuan (offshore)'), - ('COP', 'Colombian Peso'), - ('COU', 'Colombian Real Value Unit'), - ('KMF', 'Comorian Franc'), - ('CDF', 'Congolese Franc'), - ('CRC', 'Costa Rican Colón'), - ('HRD', 'Croatian Dinar'), - ('HRK', 'Croatian Kuna'), - ('CUC', 'Cuban Convertible Peso'), - ('CUP', 'Cuban Peso'), - ('CYP', 'Cypriot Pound'), - ('CZK', 'Czech Koruna'), - ('CSK', 'Czechoslovak Hard Koruna'), - ('DKK', 'Danish Krone'), - ('DJF', 'Djiboutian Franc'), - ('DOP', 'Dominican Peso'), - ('NLG', 'Dutch Guilder'), - ('XCD', 'East Caribbean Dollar'), - ('DDM', 'East German Mark'), - ('ECS', 'Ecuadorian Sucre'), - ('ECV', 'Ecuadorian Unit of Constant Value'), - ('EGP', 'Egyptian Pound'), - ('GQE', 'Equatorial Guinean Ekwele'), - ('ERN', 'Eritrean Nakfa'), - ('EEK', 'Estonian Kroon'), - ('ETB', 'Ethiopian Birr'), - ('EUR', 'Euro'), - ('XBA', 'European Composite Unit'), - ('XEU', 'European Currency Unit'), - ('XBB', 'European Monetary Unit'), - ('XBC', 'European Unit of Account (XBC)'), - ('XBD', 'European Unit of Account (XBD)'), - ('FKP', 'Falkland Islands Pound'), - ('FJD', 'Fijian Dollar'), - ('FIM', 'Finnish Markka'), - ('FRF', 'French Franc'), - ('XFO', 'French Gold Franc'), - ('XFU', 'French UIC-Franc'), - ('GMD', 'Gambian Dalasi'), - ('GEK', 'Georgian Kupon Larit'), - ('GEL', 'Georgian Lari'), - ('DEM', 'German Mark'), - ('GHS', 'Ghanaian Cedi'), - ('GHC', 'Ghanaian Cedi (1979–2007)'), - ('GIP', 'Gibraltar Pound'), - ('XAU', 'Gold'), - ('GRD', 'Greek Drachma'), - ('GTQ', 'Guatemalan Quetzal'), - ('GWP', 'Guinea-Bissau Peso'), - ('GNF', 'Guinean Franc'), - ('GNS', 'Guinean Syli'), - ('GYD', 'Guyanaese Dollar'), - ('HTG', 'Haitian Gourde'), - ('HNL', 'Honduran Lempira'), - ('HKD', 'Hong Kong Dollar'), - ('HUF', 'Hungarian Forint'), - ('IMP', 'IMP'), - ('ISK', 'Icelandic Króna'), - ('ISJ', 'Icelandic Króna (1918–1981)'), - ('INR', 'Indian Rupee'), - ('IDR', 'Indonesian Rupiah'), - ('IRR', 'Iranian Rial'), - ('IQD', 'Iraqi Dinar'), - ('IEP', 'Irish Pound'), - ('ILS', 'Israeli New Shekel'), - ('ILP', 'Israeli Pound'), - ('ILR', 'Israeli Shekel (1980–1985)'), - ('ITL', 'Italian Lira'), - ('JMD', 'Jamaican Dollar'), - ('JPY', 'Japanese Yen'), - ('JOD', 'Jordanian Dinar'), - ('KZT', 'Kazakhstani Tenge'), - ('KES', 'Kenyan Shilling'), - ('KWD', 'Kuwaiti Dinar'), - ('KGS', 'Kyrgystani Som'), - ('LAK', 'Laotian Kip'), - ('LVL', 'Latvian Lats'), - ('LVR', 'Latvian Ruble'), - ('LBP', 'Lebanese Pound'), - ('LSL', 'Lesotho Loti'), - ('LRD', 'Liberian Dollar'), - ('LYD', 'Libyan Dinar'), - ('LTL', 'Lithuanian Litas'), - ('LTT', 'Lithuanian Talonas'), - ('LUL', 'Luxembourg Financial Franc'), - ('LUC', 'Luxembourgian Convertible Franc'), - ('LUF', 'Luxembourgian Franc'), - ('MOP', 'Macanese Pataca'), - ('MKD', 'Macedonian Denar'), - ('MKN', 'Macedonian Denar (1992–1993)'), - ('MGA', 'Malagasy Ariary'), - ('MGF', 'Malagasy Franc'), - ('MWK', 'Malawian Kwacha'), - ('MYR', 'Malaysian Ringgit'), - ('MVR', 'Maldivian Rufiyaa'), - ('MVP', 'Maldivian Rupee (1947–1981)'), - ('MLF', 'Malian Franc'), - ('MTL', 'Maltese Lira'), - ('MTP', 'Maltese Pound'), - ('MRU', 'Mauritanian Ouguiya'), - ('MRO', 'Mauritanian Ouguiya (1973–2017)'), - ('MUR', 'Mauritian Rupee'), - ('MXV', 'Mexican Investment Unit'), - ('MXN', 'Mexican Peso'), - ('MXP', 'Mexican Silver Peso (1861–1992)'), - ('MDC', 'Moldovan Cupon'), - ('MDL', 'Moldovan Leu'), - ('MCF', 'Monegasque Franc'), - ('MNT', 'Mongolian Tugrik'), - ('MAD', 'Moroccan Dirham'), - ('MAF', 'Moroccan Franc'), - ('MZE', 'Mozambican Escudo'), - ('MZN', 'Mozambican Metical'), - ('MZM', 'Mozambican Metical (1980–2006)'), - ('MMK', 'Myanmar Kyat'), - ('NAD', 'Namibian Dollar'), - ('NPR', 'Nepalese Rupee'), - ('ANG', 'Netherlands Antillean Guilder'), - ('TWD', 'New Taiwan Dollar'), - ('NZD', 'New Zealand Dollar'), - ('NIO', 'Nicaraguan Córdoba'), - ('NIC', 'Nicaraguan Córdoba (1988–1991)'), - ('NGN', 'Nigerian Naira'), - ('KPW', 'North Korean Won'), - ('NOK', 'Norwegian Krone'), - ('OMR', 'Omani Rial'), - ('PKR', 'Pakistani Rupee'), - ('XPD', 'Palladium'), - ('PAB', 'Panamanian Balboa'), - ('PGK', 'Papua New Guinean Kina'), - ('PYG', 'Paraguayan Guarani'), - ('PEI', 'Peruvian Inti'), - ('PEN', 'Peruvian Sol'), - ('PES', 'Peruvian Sol (1863–1965)'), - ('PHP', 'Philippine Piso'), - ('XPT', 'Platinum'), - ('PLN', 'Polish Zloty'), - ('PLZ', 'Polish Zloty (1950–1995)'), - ('PTE', 'Portuguese Escudo'), - ('GWE', 'Portuguese Guinea Escudo'), - ('QAR', 'Qatari Rial'), - ('XRE', 'RINET Funds'), - ('RHD', 'Rhodesian Dollar'), - ('RON', 'Romanian Leu'), - ('ROL', 'Romanian Leu (1952–2006)'), - ('RUB', 'Russian Ruble'), - ('RUR', 'Russian Ruble (1991–1998)'), - ('RWF', 'Rwandan Franc'), - ('SVC', 'Salvadoran Colón'), - ('WST', 'Samoan Tala'), - ('SAR', 'Saudi Riyal'), - ('RSD', 'Serbian Dinar'), - ('CSD', 'Serbian Dinar (2002–2006)'), - ('SCR', 'Seychellois Rupee'), - ('SLL', 'Sierra Leonean Leone'), - ('XAG', 'Silver'), - ('SGD', 'Singapore Dollar'), - ('SKK', 'Slovak Koruna'), - ('SIT', 'Slovenian Tolar'), - ('SBD', 'Solomon Islands Dollar'), - ('SOS', 'Somali Shilling'), - ('ZAR', 'South African Rand'), - ('ZAL', 'South African Rand (financial)'), - ('KRH', 'South Korean Hwan (1953–1962)'), - ('KRW', 'South Korean Won'), - ('KRO', 'South Korean Won (1945–1953)'), - ('SSP', 'South Sudanese Pound'), - ('SUR', 'Soviet Rouble'), - ('ESP', 'Spanish Peseta'), - ('ESA', 'Spanish Peseta (A account)'), - ('ESB', 'Spanish Peseta (convertible account)'), - ('XDR', 'Special Drawing Rights'), - ('LKR', 'Sri Lankan Rupee'), - ('SHP', 'St. Helena Pound'), - ('XSU', 'Sucre'), - ('SDD', 'Sudanese Dinar (1992–2007)'), - ('SDG', 'Sudanese Pound'), - ('SDP', 'Sudanese Pound (1957–1998)'), - ('SRD', 'Surinamese Dollar'), - ('SRG', 'Surinamese Guilder'), - ('SZL', 'Swazi Lilangeni'), - ('SEK', 'Swedish Krona'), - ('CHF', 'Swiss Franc'), - ('SYP', 'Syrian Pound'), - ('STN', 'São Tomé & Príncipe Dobra'), - ('STD', 'São Tomé & Príncipe Dobra (1977–2017)'), - ('TVD', 'TVD'), - ('TJR', 'Tajikistani Ruble'), - ('TJS', 'Tajikistani Somoni'), - ('TZS', 'Tanzanian Shilling'), - ('XTS', 'Testing Currency Code'), - ('THB', 'Thai Baht'), + ("XUA", "ADB Unit of Account"), + ("AFN", "Afghan Afghani"), + ("AFA", "Afghan Afghani (1927–2002)"), + ("ALL", "Albanian Lek"), + ("ALK", "Albanian Lek (1946–1965)"), + ("DZD", "Algerian Dinar"), + ("ADP", "Andorran Peseta"), + ("AOA", "Angolan Kwanza"), + ("AOK", "Angolan Kwanza (1977–1991)"), + ("AON", "Angolan New Kwanza (1990–2000)"), + ("AOR", "Angolan Readjusted Kwanza (1995–1999)"), + ("ARA", "Argentine Austral"), + ("ARS", "Argentine Peso"), + ("ARM", "Argentine Peso (1881–1970)"), + ("ARP", "Argentine Peso (1983–1985)"), + ("ARL", "Argentine Peso Ley (1970–1983)"), + ("AMD", "Armenian Dram"), + ("AWG", "Aruban Florin"), + ("AUD", "Australian Dollar"), + ("ATS", "Austrian Schilling"), + ("AZN", "Azerbaijani Manat"), + ("AZM", "Azerbaijani Manat (1993–2006)"), + ("BSD", "Bahamian Dollar"), + ("BHD", "Bahraini Dinar"), + ("BDT", "Bangladeshi Taka"), + ("BBD", "Barbadian Dollar"), + ("BYN", "Belarusian Ruble"), + ("BYB", "Belarusian Ruble (1994–1999)"), + ("BYR", "Belarusian Ruble (2000–2016)"), + ("BEF", "Belgian Franc"), + ("BEC", "Belgian Franc (convertible)"), + ("BEL", "Belgian Franc (financial)"), + ("BZD", "Belize Dollar"), + ("BMD", "Bermudan Dollar"), + ("BTN", "Bhutanese Ngultrum"), + ("BOB", "Bolivian Boliviano"), + ("BOL", "Bolivian Boliviano (1863–1963)"), + ("BOV", "Bolivian Mvdol"), + ("BOP", "Bolivian Peso"), + ("BAM", "Bosnia-Herzegovina Convertible Mark"), + ("BAD", "Bosnia-Herzegovina Dinar (1992–1994)"), + ("BAN", "Bosnia-Herzegovina New Dinar (1994–1997)"), + ("BWP", "Botswanan Pula"), + ("BRC", "Brazilian Cruzado (1986–1989)"), + ("BRZ", "Brazilian Cruzeiro (1942–1967)"), + ("BRE", "Brazilian Cruzeiro (1990–1993)"), + ("BRR", "Brazilian Cruzeiro (1993–1994)"), + ("BRN", "Brazilian New Cruzado (1989–1990)"), + ("BRB", "Brazilian New Cruzeiro (1967–1986)"), + ("BRL", "Brazilian Real"), + ("GBP", "British Pound"), + ("BND", "Brunei Dollar"), + ("BGL", "Bulgarian Hard Lev"), + ("BGN", "Bulgarian Lev"), + ("BGO", "Bulgarian Lev (1879–1952)"), + ("BGM", "Bulgarian Socialist Lev"), + ("BUK", "Burmese Kyat"), + ("BIF", "Burundian Franc"), + ("XPF", "CFP Franc"), + ("KHR", "Cambodian Riel"), + ("CAD", "Canadian Dollar"), + ("CVE", "Cape Verdean Escudo"), + ("KYD", "Cayman Islands Dollar"), + ("XAF", "Central African CFA Franc"), + ("CLE", "Chilean Escudo"), + ("CLP", "Chilean Peso"), + ("CLF", "Chilean Unit of Account (UF)"), + ("CNX", "Chinese People’s Bank Dollar"), + ("CNY", "Chinese Yuan"), + ("CNH", "Chinese Yuan (offshore)"), + ("COP", "Colombian Peso"), + ("COU", "Colombian Real Value Unit"), + ("KMF", "Comorian Franc"), + ("CDF", "Congolese Franc"), + ("CRC", "Costa Rican Colón"), + ("HRD", "Croatian Dinar"), + ("HRK", "Croatian Kuna"), + ("CUC", "Cuban Convertible Peso"), + ("CUP", "Cuban Peso"), + ("CYP", "Cypriot Pound"), + ("CZK", "Czech Koruna"), + ("CSK", "Czechoslovak Hard Koruna"), + ("DKK", "Danish Krone"), + ("DJF", "Djiboutian Franc"), + ("DOP", "Dominican Peso"), + ("NLG", "Dutch Guilder"), + ("XCD", "East Caribbean Dollar"), + ("DDM", "East German Mark"), + ("ECS", "Ecuadorian Sucre"), + ("ECV", "Ecuadorian Unit of Constant Value"), + ("EGP", "Egyptian Pound"), + ("GQE", "Equatorial Guinean Ekwele"), + ("ERN", "Eritrean Nakfa"), + ("EEK", "Estonian Kroon"), + ("ETB", "Ethiopian Birr"), + ("EUR", "Euro"), + ("XBA", "European Composite Unit"), + ("XEU", "European Currency Unit"), + ("XBB", "European Monetary Unit"), + ("XBC", "European Unit of Account (XBC)"), + ("XBD", "European Unit of Account (XBD)"), + ("FKP", "Falkland Islands Pound"), + ("FJD", "Fijian Dollar"), + ("FIM", "Finnish Markka"), + ("FRF", "French Franc"), + ("XFO", "French Gold Franc"), + ("XFU", "French UIC-Franc"), + ("GMD", "Gambian Dalasi"), + ("GEK", "Georgian Kupon Larit"), + ("GEL", "Georgian Lari"), + ("DEM", "German Mark"), + ("GHS", "Ghanaian Cedi"), + ("GHC", "Ghanaian Cedi (1979–2007)"), + ("GIP", "Gibraltar Pound"), + ("XAU", "Gold"), + ("GRD", "Greek Drachma"), + ("GTQ", "Guatemalan Quetzal"), + ("GWP", "Guinea-Bissau Peso"), + ("GNF", "Guinean Franc"), + ("GNS", "Guinean Syli"), + ("GYD", "Guyanaese Dollar"), + ("HTG", "Haitian Gourde"), + ("HNL", "Honduran Lempira"), + ("HKD", "Hong Kong Dollar"), + ("HUF", "Hungarian Forint"), + ("IMP", "IMP"), + ("ISK", "Icelandic Króna"), + ("ISJ", "Icelandic Króna (1918–1981)"), + ("INR", "Indian Rupee"), + ("IDR", "Indonesian Rupiah"), + ("IRR", "Iranian Rial"), + ("IQD", "Iraqi Dinar"), + ("IEP", "Irish Pound"), + ("ILS", "Israeli New Shekel"), + ("ILP", "Israeli Pound"), + ("ILR", "Israeli Shekel (1980–1985)"), + ("ITL", "Italian Lira"), + ("JMD", "Jamaican Dollar"), + ("JPY", "Japanese Yen"), + ("JOD", "Jordanian Dinar"), + ("KZT", "Kazakhstani Tenge"), + ("KES", "Kenyan Shilling"), + ("KWD", "Kuwaiti Dinar"), + ("KGS", "Kyrgystani Som"), + ("LAK", "Laotian Kip"), + ("LVL", "Latvian Lats"), + ("LVR", "Latvian Ruble"), + ("LBP", "Lebanese Pound"), + ("LSL", "Lesotho Loti"), + ("LRD", "Liberian Dollar"), + ("LYD", "Libyan Dinar"), + ("LTL", "Lithuanian Litas"), + ("LTT", "Lithuanian Talonas"), + ("LUL", "Luxembourg Financial Franc"), + ("LUC", "Luxembourgian Convertible Franc"), + ("LUF", "Luxembourgian Franc"), + ("MOP", "Macanese Pataca"), + ("MKD", "Macedonian Denar"), + ("MKN", "Macedonian Denar (1992–1993)"), + ("MGA", "Malagasy Ariary"), + ("MGF", "Malagasy Franc"), + ("MWK", "Malawian Kwacha"), + ("MYR", "Malaysian Ringgit"), + ("MVR", "Maldivian Rufiyaa"), + ("MVP", "Maldivian Rupee (1947–1981)"), + ("MLF", "Malian Franc"), + ("MTL", "Maltese Lira"), + ("MTP", "Maltese Pound"), + ("MRU", "Mauritanian Ouguiya"), + ("MRO", "Mauritanian Ouguiya (1973–2017)"), + ("MUR", "Mauritian Rupee"), + ("MXV", "Mexican Investment Unit"), + ("MXN", "Mexican Peso"), + ("MXP", "Mexican Silver Peso (1861–1992)"), + ("MDC", "Moldovan Cupon"), + ("MDL", "Moldovan Leu"), + ("MCF", "Monegasque Franc"), + ("MNT", "Mongolian Tugrik"), + ("MAD", "Moroccan Dirham"), + ("MAF", "Moroccan Franc"), + ("MZE", "Mozambican Escudo"), + ("MZN", "Mozambican Metical"), + ("MZM", "Mozambican Metical (1980–2006)"), + ("MMK", "Myanmar Kyat"), + ("NAD", "Namibian Dollar"), + ("NPR", "Nepalese Rupee"), + ("ANG", "Netherlands Antillean Guilder"), + ("TWD", "New Taiwan Dollar"), + ("NZD", "New Zealand Dollar"), + ("NIO", "Nicaraguan Córdoba"), + ("NIC", "Nicaraguan Córdoba (1988–1991)"), + ("NGN", "Nigerian Naira"), + ("KPW", "North Korean Won"), + ("NOK", "Norwegian Krone"), + ("OMR", "Omani Rial"), + ("PKR", "Pakistani Rupee"), + ("XPD", "Palladium"), + ("PAB", "Panamanian Balboa"), + ("PGK", "Papua New Guinean Kina"), + ("PYG", "Paraguayan Guarani"), + ("PEI", "Peruvian Inti"), + ("PEN", "Peruvian Sol"), + ("PES", "Peruvian Sol (1863–1965)"), + ("PHP", "Philippine Piso"), + ("XPT", "Platinum"), + ("PLN", "Polish Zloty"), + ("PLZ", "Polish Zloty (1950–1995)"), + ("PTE", "Portuguese Escudo"), + ("GWE", "Portuguese Guinea Escudo"), + ("QAR", "Qatari Rial"), + ("XRE", "RINET Funds"), + ("RHD", "Rhodesian Dollar"), + ("RON", "Romanian Leu"), + ("ROL", "Romanian Leu (1952–2006)"), + ("RUB", "Russian Ruble"), + ("RUR", "Russian Ruble (1991–1998)"), + ("RWF", "Rwandan Franc"), + ("SVC", "Salvadoran Colón"), + ("WST", "Samoan Tala"), + ("SAR", "Saudi Riyal"), + ("RSD", "Serbian Dinar"), + ("CSD", "Serbian Dinar (2002–2006)"), + ("SCR", "Seychellois Rupee"), + ("SLL", "Sierra Leonean Leone"), + ("XAG", "Silver"), + ("SGD", "Singapore Dollar"), + ("SKK", "Slovak Koruna"), + ("SIT", "Slovenian Tolar"), + ("SBD", "Solomon Islands Dollar"), + ("SOS", "Somali Shilling"), + ("ZAR", "South African Rand"), + ("ZAL", "South African Rand (financial)"), + ("KRH", "South Korean Hwan (1953–1962)"), + ("KRW", "South Korean Won"), + ("KRO", "South Korean Won (1945–1953)"), + ("SSP", "South Sudanese Pound"), + ("SUR", "Soviet Rouble"), + ("ESP", "Spanish Peseta"), + ("ESA", "Spanish Peseta (A account)"), + ("ESB", "Spanish Peseta (convertible account)"), + ("XDR", "Special Drawing Rights"), + ("LKR", "Sri Lankan Rupee"), + ("SHP", "St. Helena Pound"), + ("XSU", "Sucre"), + ("SDD", "Sudanese Dinar (1992–2007)"), + ("SDG", "Sudanese Pound"), + ("SDP", "Sudanese Pound (1957–1998)"), + ("SRD", "Surinamese Dollar"), + ("SRG", "Surinamese Guilder"), + ("SZL", "Swazi Lilangeni"), + ("SEK", "Swedish Krona"), + ("CHF", "Swiss Franc"), + ("SYP", "Syrian Pound"), + ("STN", "São Tomé & Príncipe Dobra"), + ("STD", "São Tomé & Príncipe Dobra (1977–2017)"), + ("TVD", "TVD"), + ("TJR", "Tajikistani Ruble"), + ("TJS", "Tajikistani Somoni"), + ("TZS", "Tanzanian Shilling"), + ("XTS", "Testing Currency Code"), + ("THB", "Thai Baht"), ( - 'XXX', - 'The codes assigned for transactions where no currency is involved', + "XXX", + "The codes assigned for transactions where no currency is involved", ), - ('TPE', 'Timorese Escudo'), - ('TOP', 'Tongan Paʻanga'), - ('TTD', 'Trinidad & Tobago Dollar'), - ('TND', 'Tunisian Dinar'), - ('TRY', 'Turkish Lira'), - ('TRL', 'Turkish Lira (1922–2005)'), - ('TMT', 'Turkmenistani Manat'), - ('TMM', 'Turkmenistani Manat (1993–2009)'), - ('USD', 'US Dollar'), - ('USN', 'US Dollar (Next day)'), - ('USS', 'US Dollar (Same day)'), - ('UGX', 'Ugandan Shilling'), - ('UGS', 'Ugandan Shilling (1966–1987)'), - ('UAH', 'Ukrainian Hryvnia'), - ('UAK', 'Ukrainian Karbovanets'), - ('AED', 'United Arab Emirates Dirham'), - ('UYW', 'Uruguayan Nominal Wage Index Unit'), - ('UYU', 'Uruguayan Peso'), - ('UYP', 'Uruguayan Peso (1975–1993)'), - ('UYI', 'Uruguayan Peso (Indexed Units)'), - ('UZS', 'Uzbekistani Som'), - ('VUV', 'Vanuatu Vatu'), - ('VES', 'Venezuelan Bolívar'), - ('VEB', 'Venezuelan Bolívar (1871–2008)'), - ('VEF', 'Venezuelan Bolívar (2008–2018)'), - ('VND', 'Vietnamese Dong'), - ('VNN', 'Vietnamese Dong (1978–1985)'), - ('CHE', 'WIR Euro'), - ('CHW', 'WIR Franc'), - ('XOF', 'West African CFA Franc'), - ('YDD', 'Yemeni Dinar'), - ('YER', 'Yemeni Rial'), - ('YUN', 'Yugoslavian Convertible Dinar (1990–1992)'), - ('YUD', 'Yugoslavian Hard Dinar (1966–1990)'), - ('YUM', 'Yugoslavian New Dinar (1994–2002)'), - ('YUR', 'Yugoslavian Reformed Dinar (1992–1993)'), - ('ZWN', 'ZWN'), - ('ZRN', 'Zairean New Zaire (1993–1998)'), - ('ZRZ', 'Zairean Zaire (1971–1993)'), - ('ZMW', 'Zambian Kwacha'), - ('ZMK', 'Zambian Kwacha (1968–2012)'), - ('ZWD', 'Zimbabwean Dollar (1980–2008)'), - ('ZWR', 'Zimbabwean Dollar (2008)'), - ('ZWL', 'Zimbabwean Dollar (2009)'), + ("TPE", "Timorese Escudo"), + ("TOP", "Tongan Paʻanga"), + ("TTD", "Trinidad & Tobago Dollar"), + ("TND", "Tunisian Dinar"), + ("TRY", "Turkish Lira"), + ("TRL", "Turkish Lira (1922–2005)"), + ("TMT", "Turkmenistani Manat"), + ("TMM", "Turkmenistani Manat (1993–2009)"), + ("USD", "US Dollar"), + ("USN", "US Dollar (Next day)"), + ("USS", "US Dollar (Same day)"), + ("UGX", "Ugandan Shilling"), + ("UGS", "Ugandan Shilling (1966–1987)"), + ("UAH", "Ukrainian Hryvnia"), + ("UAK", "Ukrainian Karbovanets"), + ("AED", "United Arab Emirates Dirham"), + ("UYW", "Uruguayan Nominal Wage Index Unit"), + ("UYU", "Uruguayan Peso"), + ("UYP", "Uruguayan Peso (1975–1993)"), + ("UYI", "Uruguayan Peso (Indexed Units)"), + ("UZS", "Uzbekistani Som"), + ("VUV", "Vanuatu Vatu"), + ("VES", "Venezuelan Bolívar"), + ("VEB", "Venezuelan Bolívar (1871–2008)"), + ("VEF", "Venezuelan Bolívar (2008–2018)"), + ("VND", "Vietnamese Dong"), + ("VNN", "Vietnamese Dong (1978–1985)"), + ("CHE", "WIR Euro"), + ("CHW", "WIR Franc"), + ("XOF", "West African CFA Franc"), + ("YDD", "Yemeni Dinar"), + ("YER", "Yemeni Rial"), + ("YUN", "Yugoslavian Convertible Dinar (1990–1992)"), + ("YUD", "Yugoslavian Hard Dinar (1966–1990)"), + ("YUM", "Yugoslavian New Dinar (1994–2002)"), + ("YUR", "Yugoslavian Reformed Dinar (1992–1993)"), + ("ZWN", "ZWN"), + ("ZRN", "Zairean New Zaire (1993–1998)"), + ("ZRZ", "Zairean Zaire (1971–1993)"), + ("ZMW", "Zambian Kwacha"), + ("ZMK", "Zambian Kwacha (1968–2012)"), + ("ZWD", "Zimbabwean Dollar (1980–2008)"), + ("ZWR", "Zimbabwean Dollar (2008)"), + ("ZWL", "Zimbabwean Dollar (2009)"), ], - default='USD', + default="USD", editable=False, max_length=3, ), ), migrations.AlterField( - model_name='meeting', - name='treasurer_balance_currency', + model_name="meeting", + name="treasurer_balance_currency", field=djmoney.models.fields.CurrencyField( choices=[ - ('XUA', 'ADB Unit of Account'), - ('AFN', 'Afghan Afghani'), - ('AFA', 'Afghan Afghani (1927–2002)'), - ('ALL', 'Albanian Lek'), - ('ALK', 'Albanian Lek (1946–1965)'), - ('DZD', 'Algerian Dinar'), - ('ADP', 'Andorran Peseta'), - ('AOA', 'Angolan Kwanza'), - ('AOK', 'Angolan Kwanza (1977–1991)'), - ('AON', 'Angolan New Kwanza (1990–2000)'), - ('AOR', 'Angolan Readjusted Kwanza (1995–1999)'), - ('ARA', 'Argentine Austral'), - ('ARS', 'Argentine Peso'), - ('ARM', 'Argentine Peso (1881–1970)'), - ('ARP', 'Argentine Peso (1983–1985)'), - ('ARL', 'Argentine Peso Ley (1970–1983)'), - ('AMD', 'Armenian Dram'), - ('AWG', 'Aruban Florin'), - ('AUD', 'Australian Dollar'), - ('ATS', 'Austrian Schilling'), - ('AZN', 'Azerbaijani Manat'), - ('AZM', 'Azerbaijani Manat (1993–2006)'), - ('BSD', 'Bahamian Dollar'), - ('BHD', 'Bahraini Dinar'), - ('BDT', 'Bangladeshi Taka'), - ('BBD', 'Barbadian Dollar'), - ('BYN', 'Belarusian Ruble'), - ('BYB', 'Belarusian Ruble (1994–1999)'), - ('BYR', 'Belarusian Ruble (2000–2016)'), - ('BEF', 'Belgian Franc'), - ('BEC', 'Belgian Franc (convertible)'), - ('BEL', 'Belgian Franc (financial)'), - ('BZD', 'Belize Dollar'), - ('BMD', 'Bermudan Dollar'), - ('BTN', 'Bhutanese Ngultrum'), - ('BOB', 'Bolivian Boliviano'), - ('BOL', 'Bolivian Boliviano (1863–1963)'), - ('BOV', 'Bolivian Mvdol'), - ('BOP', 'Bolivian Peso'), - ('BAM', 'Bosnia-Herzegovina Convertible Mark'), - ('BAD', 'Bosnia-Herzegovina Dinar (1992–1994)'), - ('BAN', 'Bosnia-Herzegovina New Dinar (1994–1997)'), - ('BWP', 'Botswanan Pula'), - ('BRC', 'Brazilian Cruzado (1986–1989)'), - ('BRZ', 'Brazilian Cruzeiro (1942–1967)'), - ('BRE', 'Brazilian Cruzeiro (1990–1993)'), - ('BRR', 'Brazilian Cruzeiro (1993–1994)'), - ('BRN', 'Brazilian New Cruzado (1989–1990)'), - ('BRB', 'Brazilian New Cruzeiro (1967–1986)'), - ('BRL', 'Brazilian Real'), - ('GBP', 'British Pound'), - ('BND', 'Brunei Dollar'), - ('BGL', 'Bulgarian Hard Lev'), - ('BGN', 'Bulgarian Lev'), - ('BGO', 'Bulgarian Lev (1879–1952)'), - ('BGM', 'Bulgarian Socialist Lev'), - ('BUK', 'Burmese Kyat'), - ('BIF', 'Burundian Franc'), - ('XPF', 'CFP Franc'), - ('KHR', 'Cambodian Riel'), - ('CAD', 'Canadian Dollar'), - ('CVE', 'Cape Verdean Escudo'), - ('KYD', 'Cayman Islands Dollar'), - ('XAF', 'Central African CFA Franc'), - ('CLE', 'Chilean Escudo'), - ('CLP', 'Chilean Peso'), - ('CLF', 'Chilean Unit of Account (UF)'), - ('CNX', 'Chinese People’s Bank Dollar'), - ('CNY', 'Chinese Yuan'), - ('CNH', 'Chinese Yuan (offshore)'), - ('COP', 'Colombian Peso'), - ('COU', 'Colombian Real Value Unit'), - ('KMF', 'Comorian Franc'), - ('CDF', 'Congolese Franc'), - ('CRC', 'Costa Rican Colón'), - ('HRD', 'Croatian Dinar'), - ('HRK', 'Croatian Kuna'), - ('CUC', 'Cuban Convertible Peso'), - ('CUP', 'Cuban Peso'), - ('CYP', 'Cypriot Pound'), - ('CZK', 'Czech Koruna'), - ('CSK', 'Czechoslovak Hard Koruna'), - ('DKK', 'Danish Krone'), - ('DJF', 'Djiboutian Franc'), - ('DOP', 'Dominican Peso'), - ('NLG', 'Dutch Guilder'), - ('XCD', 'East Caribbean Dollar'), - ('DDM', 'East German Mark'), - ('ECS', 'Ecuadorian Sucre'), - ('ECV', 'Ecuadorian Unit of Constant Value'), - ('EGP', 'Egyptian Pound'), - ('GQE', 'Equatorial Guinean Ekwele'), - ('ERN', 'Eritrean Nakfa'), - ('EEK', 'Estonian Kroon'), - ('ETB', 'Ethiopian Birr'), - ('EUR', 'Euro'), - ('XBA', 'European Composite Unit'), - ('XEU', 'European Currency Unit'), - ('XBB', 'European Monetary Unit'), - ('XBC', 'European Unit of Account (XBC)'), - ('XBD', 'European Unit of Account (XBD)'), - ('FKP', 'Falkland Islands Pound'), - ('FJD', 'Fijian Dollar'), - ('FIM', 'Finnish Markka'), - ('FRF', 'French Franc'), - ('XFO', 'French Gold Franc'), - ('XFU', 'French UIC-Franc'), - ('GMD', 'Gambian Dalasi'), - ('GEK', 'Georgian Kupon Larit'), - ('GEL', 'Georgian Lari'), - ('DEM', 'German Mark'), - ('GHS', 'Ghanaian Cedi'), - ('GHC', 'Ghanaian Cedi (1979–2007)'), - ('GIP', 'Gibraltar Pound'), - ('XAU', 'Gold'), - ('GRD', 'Greek Drachma'), - ('GTQ', 'Guatemalan Quetzal'), - ('GWP', 'Guinea-Bissau Peso'), - ('GNF', 'Guinean Franc'), - ('GNS', 'Guinean Syli'), - ('GYD', 'Guyanaese Dollar'), - ('HTG', 'Haitian Gourde'), - ('HNL', 'Honduran Lempira'), - ('HKD', 'Hong Kong Dollar'), - ('HUF', 'Hungarian Forint'), - ('IMP', 'IMP'), - ('ISK', 'Icelandic Króna'), - ('ISJ', 'Icelandic Króna (1918–1981)'), - ('INR', 'Indian Rupee'), - ('IDR', 'Indonesian Rupiah'), - ('IRR', 'Iranian Rial'), - ('IQD', 'Iraqi Dinar'), - ('IEP', 'Irish Pound'), - ('ILS', 'Israeli New Shekel'), - ('ILP', 'Israeli Pound'), - ('ILR', 'Israeli Shekel (1980–1985)'), - ('ITL', 'Italian Lira'), - ('JMD', 'Jamaican Dollar'), - ('JPY', 'Japanese Yen'), - ('JOD', 'Jordanian Dinar'), - ('KZT', 'Kazakhstani Tenge'), - ('KES', 'Kenyan Shilling'), - ('KWD', 'Kuwaiti Dinar'), - ('KGS', 'Kyrgystani Som'), - ('LAK', 'Laotian Kip'), - ('LVL', 'Latvian Lats'), - ('LVR', 'Latvian Ruble'), - ('LBP', 'Lebanese Pound'), - ('LSL', 'Lesotho Loti'), - ('LRD', 'Liberian Dollar'), - ('LYD', 'Libyan Dinar'), - ('LTL', 'Lithuanian Litas'), - ('LTT', 'Lithuanian Talonas'), - ('LUL', 'Luxembourg Financial Franc'), - ('LUC', 'Luxembourgian Convertible Franc'), - ('LUF', 'Luxembourgian Franc'), - ('MOP', 'Macanese Pataca'), - ('MKD', 'Macedonian Denar'), - ('MKN', 'Macedonian Denar (1992–1993)'), - ('MGA', 'Malagasy Ariary'), - ('MGF', 'Malagasy Franc'), - ('MWK', 'Malawian Kwacha'), - ('MYR', 'Malaysian Ringgit'), - ('MVR', 'Maldivian Rufiyaa'), - ('MVP', 'Maldivian Rupee (1947–1981)'), - ('MLF', 'Malian Franc'), - ('MTL', 'Maltese Lira'), - ('MTP', 'Maltese Pound'), - ('MRU', 'Mauritanian Ouguiya'), - ('MRO', 'Mauritanian Ouguiya (1973–2017)'), - ('MUR', 'Mauritian Rupee'), - ('MXV', 'Mexican Investment Unit'), - ('MXN', 'Mexican Peso'), - ('MXP', 'Mexican Silver Peso (1861–1992)'), - ('MDC', 'Moldovan Cupon'), - ('MDL', 'Moldovan Leu'), - ('MCF', 'Monegasque Franc'), - ('MNT', 'Mongolian Tugrik'), - ('MAD', 'Moroccan Dirham'), - ('MAF', 'Moroccan Franc'), - ('MZE', 'Mozambican Escudo'), - ('MZN', 'Mozambican Metical'), - ('MZM', 'Mozambican Metical (1980–2006)'), - ('MMK', 'Myanmar Kyat'), - ('NAD', 'Namibian Dollar'), - ('NPR', 'Nepalese Rupee'), - ('ANG', 'Netherlands Antillean Guilder'), - ('TWD', 'New Taiwan Dollar'), - ('NZD', 'New Zealand Dollar'), - ('NIO', 'Nicaraguan Córdoba'), - ('NIC', 'Nicaraguan Córdoba (1988–1991)'), - ('NGN', 'Nigerian Naira'), - ('KPW', 'North Korean Won'), - ('NOK', 'Norwegian Krone'), - ('OMR', 'Omani Rial'), - ('PKR', 'Pakistani Rupee'), - ('XPD', 'Palladium'), - ('PAB', 'Panamanian Balboa'), - ('PGK', 'Papua New Guinean Kina'), - ('PYG', 'Paraguayan Guarani'), - ('PEI', 'Peruvian Inti'), - ('PEN', 'Peruvian Sol'), - ('PES', 'Peruvian Sol (1863–1965)'), - ('PHP', 'Philippine Piso'), - ('XPT', 'Platinum'), - ('PLN', 'Polish Zloty'), - ('PLZ', 'Polish Zloty (1950–1995)'), - ('PTE', 'Portuguese Escudo'), - ('GWE', 'Portuguese Guinea Escudo'), - ('QAR', 'Qatari Rial'), - ('XRE', 'RINET Funds'), - ('RHD', 'Rhodesian Dollar'), - ('RON', 'Romanian Leu'), - ('ROL', 'Romanian Leu (1952–2006)'), - ('RUB', 'Russian Ruble'), - ('RUR', 'Russian Ruble (1991–1998)'), - ('RWF', 'Rwandan Franc'), - ('SVC', 'Salvadoran Colón'), - ('WST', 'Samoan Tala'), - ('SAR', 'Saudi Riyal'), - ('RSD', 'Serbian Dinar'), - ('CSD', 'Serbian Dinar (2002–2006)'), - ('SCR', 'Seychellois Rupee'), - ('SLL', 'Sierra Leonean Leone'), - ('XAG', 'Silver'), - ('SGD', 'Singapore Dollar'), - ('SKK', 'Slovak Koruna'), - ('SIT', 'Slovenian Tolar'), - ('SBD', 'Solomon Islands Dollar'), - ('SOS', 'Somali Shilling'), - ('ZAR', 'South African Rand'), - ('ZAL', 'South African Rand (financial)'), - ('KRH', 'South Korean Hwan (1953–1962)'), - ('KRW', 'South Korean Won'), - ('KRO', 'South Korean Won (1945–1953)'), - ('SSP', 'South Sudanese Pound'), - ('SUR', 'Soviet Rouble'), - ('ESP', 'Spanish Peseta'), - ('ESA', 'Spanish Peseta (A account)'), - ('ESB', 'Spanish Peseta (convertible account)'), - ('XDR', 'Special Drawing Rights'), - ('LKR', 'Sri Lankan Rupee'), - ('SHP', 'St. Helena Pound'), - ('XSU', 'Sucre'), - ('SDD', 'Sudanese Dinar (1992–2007)'), - ('SDG', 'Sudanese Pound'), - ('SDP', 'Sudanese Pound (1957–1998)'), - ('SRD', 'Surinamese Dollar'), - ('SRG', 'Surinamese Guilder'), - ('SZL', 'Swazi Lilangeni'), - ('SEK', 'Swedish Krona'), - ('CHF', 'Swiss Franc'), - ('SYP', 'Syrian Pound'), - ('STN', 'São Tomé & Príncipe Dobra'), - ('STD', 'São Tomé & Príncipe Dobra (1977–2017)'), - ('TVD', 'TVD'), - ('TJR', 'Tajikistani Ruble'), - ('TJS', 'Tajikistani Somoni'), - ('TZS', 'Tanzanian Shilling'), - ('XTS', 'Testing Currency Code'), - ('THB', 'Thai Baht'), + ("XUA", "ADB Unit of Account"), + ("AFN", "Afghan Afghani"), + ("AFA", "Afghan Afghani (1927–2002)"), + ("ALL", "Albanian Lek"), + ("ALK", "Albanian Lek (1946–1965)"), + ("DZD", "Algerian Dinar"), + ("ADP", "Andorran Peseta"), + ("AOA", "Angolan Kwanza"), + ("AOK", "Angolan Kwanza (1977–1991)"), + ("AON", "Angolan New Kwanza (1990–2000)"), + ("AOR", "Angolan Readjusted Kwanza (1995–1999)"), + ("ARA", "Argentine Austral"), + ("ARS", "Argentine Peso"), + ("ARM", "Argentine Peso (1881–1970)"), + ("ARP", "Argentine Peso (1983–1985)"), + ("ARL", "Argentine Peso Ley (1970–1983)"), + ("AMD", "Armenian Dram"), + ("AWG", "Aruban Florin"), + ("AUD", "Australian Dollar"), + ("ATS", "Austrian Schilling"), + ("AZN", "Azerbaijani Manat"), + ("AZM", "Azerbaijani Manat (1993–2006)"), + ("BSD", "Bahamian Dollar"), + ("BHD", "Bahraini Dinar"), + ("BDT", "Bangladeshi Taka"), + ("BBD", "Barbadian Dollar"), + ("BYN", "Belarusian Ruble"), + ("BYB", "Belarusian Ruble (1994–1999)"), + ("BYR", "Belarusian Ruble (2000–2016)"), + ("BEF", "Belgian Franc"), + ("BEC", "Belgian Franc (convertible)"), + ("BEL", "Belgian Franc (financial)"), + ("BZD", "Belize Dollar"), + ("BMD", "Bermudan Dollar"), + ("BTN", "Bhutanese Ngultrum"), + ("BOB", "Bolivian Boliviano"), + ("BOL", "Bolivian Boliviano (1863–1963)"), + ("BOV", "Bolivian Mvdol"), + ("BOP", "Bolivian Peso"), + ("BAM", "Bosnia-Herzegovina Convertible Mark"), + ("BAD", "Bosnia-Herzegovina Dinar (1992–1994)"), + ("BAN", "Bosnia-Herzegovina New Dinar (1994–1997)"), + ("BWP", "Botswanan Pula"), + ("BRC", "Brazilian Cruzado (1986–1989)"), + ("BRZ", "Brazilian Cruzeiro (1942–1967)"), + ("BRE", "Brazilian Cruzeiro (1990–1993)"), + ("BRR", "Brazilian Cruzeiro (1993–1994)"), + ("BRN", "Brazilian New Cruzado (1989–1990)"), + ("BRB", "Brazilian New Cruzeiro (1967–1986)"), + ("BRL", "Brazilian Real"), + ("GBP", "British Pound"), + ("BND", "Brunei Dollar"), + ("BGL", "Bulgarian Hard Lev"), + ("BGN", "Bulgarian Lev"), + ("BGO", "Bulgarian Lev (1879–1952)"), + ("BGM", "Bulgarian Socialist Lev"), + ("BUK", "Burmese Kyat"), + ("BIF", "Burundian Franc"), + ("XPF", "CFP Franc"), + ("KHR", "Cambodian Riel"), + ("CAD", "Canadian Dollar"), + ("CVE", "Cape Verdean Escudo"), + ("KYD", "Cayman Islands Dollar"), + ("XAF", "Central African CFA Franc"), + ("CLE", "Chilean Escudo"), + ("CLP", "Chilean Peso"), + ("CLF", "Chilean Unit of Account (UF)"), + ("CNX", "Chinese People’s Bank Dollar"), + ("CNY", "Chinese Yuan"), + ("CNH", "Chinese Yuan (offshore)"), + ("COP", "Colombian Peso"), + ("COU", "Colombian Real Value Unit"), + ("KMF", "Comorian Franc"), + ("CDF", "Congolese Franc"), + ("CRC", "Costa Rican Colón"), + ("HRD", "Croatian Dinar"), + ("HRK", "Croatian Kuna"), + ("CUC", "Cuban Convertible Peso"), + ("CUP", "Cuban Peso"), + ("CYP", "Cypriot Pound"), + ("CZK", "Czech Koruna"), + ("CSK", "Czechoslovak Hard Koruna"), + ("DKK", "Danish Krone"), + ("DJF", "Djiboutian Franc"), + ("DOP", "Dominican Peso"), + ("NLG", "Dutch Guilder"), + ("XCD", "East Caribbean Dollar"), + ("DDM", "East German Mark"), + ("ECS", "Ecuadorian Sucre"), + ("ECV", "Ecuadorian Unit of Constant Value"), + ("EGP", "Egyptian Pound"), + ("GQE", "Equatorial Guinean Ekwele"), + ("ERN", "Eritrean Nakfa"), + ("EEK", "Estonian Kroon"), + ("ETB", "Ethiopian Birr"), + ("EUR", "Euro"), + ("XBA", "European Composite Unit"), + ("XEU", "European Currency Unit"), + ("XBB", "European Monetary Unit"), + ("XBC", "European Unit of Account (XBC)"), + ("XBD", "European Unit of Account (XBD)"), + ("FKP", "Falkland Islands Pound"), + ("FJD", "Fijian Dollar"), + ("FIM", "Finnish Markka"), + ("FRF", "French Franc"), + ("XFO", "French Gold Franc"), + ("XFU", "French UIC-Franc"), + ("GMD", "Gambian Dalasi"), + ("GEK", "Georgian Kupon Larit"), + ("GEL", "Georgian Lari"), + ("DEM", "German Mark"), + ("GHS", "Ghanaian Cedi"), + ("GHC", "Ghanaian Cedi (1979–2007)"), + ("GIP", "Gibraltar Pound"), + ("XAU", "Gold"), + ("GRD", "Greek Drachma"), + ("GTQ", "Guatemalan Quetzal"), + ("GWP", "Guinea-Bissau Peso"), + ("GNF", "Guinean Franc"), + ("GNS", "Guinean Syli"), + ("GYD", "Guyanaese Dollar"), + ("HTG", "Haitian Gourde"), + ("HNL", "Honduran Lempira"), + ("HKD", "Hong Kong Dollar"), + ("HUF", "Hungarian Forint"), + ("IMP", "IMP"), + ("ISK", "Icelandic Króna"), + ("ISJ", "Icelandic Króna (1918–1981)"), + ("INR", "Indian Rupee"), + ("IDR", "Indonesian Rupiah"), + ("IRR", "Iranian Rial"), + ("IQD", "Iraqi Dinar"), + ("IEP", "Irish Pound"), + ("ILS", "Israeli New Shekel"), + ("ILP", "Israeli Pound"), + ("ILR", "Israeli Shekel (1980–1985)"), + ("ITL", "Italian Lira"), + ("JMD", "Jamaican Dollar"), + ("JPY", "Japanese Yen"), + ("JOD", "Jordanian Dinar"), + ("KZT", "Kazakhstani Tenge"), + ("KES", "Kenyan Shilling"), + ("KWD", "Kuwaiti Dinar"), + ("KGS", "Kyrgystani Som"), + ("LAK", "Laotian Kip"), + ("LVL", "Latvian Lats"), + ("LVR", "Latvian Ruble"), + ("LBP", "Lebanese Pound"), + ("LSL", "Lesotho Loti"), + ("LRD", "Liberian Dollar"), + ("LYD", "Libyan Dinar"), + ("LTL", "Lithuanian Litas"), + ("LTT", "Lithuanian Talonas"), + ("LUL", "Luxembourg Financial Franc"), + ("LUC", "Luxembourgian Convertible Franc"), + ("LUF", "Luxembourgian Franc"), + ("MOP", "Macanese Pataca"), + ("MKD", "Macedonian Denar"), + ("MKN", "Macedonian Denar (1992–1993)"), + ("MGA", "Malagasy Ariary"), + ("MGF", "Malagasy Franc"), + ("MWK", "Malawian Kwacha"), + ("MYR", "Malaysian Ringgit"), + ("MVR", "Maldivian Rufiyaa"), + ("MVP", "Maldivian Rupee (1947–1981)"), + ("MLF", "Malian Franc"), + ("MTL", "Maltese Lira"), + ("MTP", "Maltese Pound"), + ("MRU", "Mauritanian Ouguiya"), + ("MRO", "Mauritanian Ouguiya (1973–2017)"), + ("MUR", "Mauritian Rupee"), + ("MXV", "Mexican Investment Unit"), + ("MXN", "Mexican Peso"), + ("MXP", "Mexican Silver Peso (1861–1992)"), + ("MDC", "Moldovan Cupon"), + ("MDL", "Moldovan Leu"), + ("MCF", "Monegasque Franc"), + ("MNT", "Mongolian Tugrik"), + ("MAD", "Moroccan Dirham"), + ("MAF", "Moroccan Franc"), + ("MZE", "Mozambican Escudo"), + ("MZN", "Mozambican Metical"), + ("MZM", "Mozambican Metical (1980–2006)"), + ("MMK", "Myanmar Kyat"), + ("NAD", "Namibian Dollar"), + ("NPR", "Nepalese Rupee"), + ("ANG", "Netherlands Antillean Guilder"), + ("TWD", "New Taiwan Dollar"), + ("NZD", "New Zealand Dollar"), + ("NIO", "Nicaraguan Córdoba"), + ("NIC", "Nicaraguan Córdoba (1988–1991)"), + ("NGN", "Nigerian Naira"), + ("KPW", "North Korean Won"), + ("NOK", "Norwegian Krone"), + ("OMR", "Omani Rial"), + ("PKR", "Pakistani Rupee"), + ("XPD", "Palladium"), + ("PAB", "Panamanian Balboa"), + ("PGK", "Papua New Guinean Kina"), + ("PYG", "Paraguayan Guarani"), + ("PEI", "Peruvian Inti"), + ("PEN", "Peruvian Sol"), + ("PES", "Peruvian Sol (1863–1965)"), + ("PHP", "Philippine Piso"), + ("XPT", "Platinum"), + ("PLN", "Polish Zloty"), + ("PLZ", "Polish Zloty (1950–1995)"), + ("PTE", "Portuguese Escudo"), + ("GWE", "Portuguese Guinea Escudo"), + ("QAR", "Qatari Rial"), + ("XRE", "RINET Funds"), + ("RHD", "Rhodesian Dollar"), + ("RON", "Romanian Leu"), + ("ROL", "Romanian Leu (1952–2006)"), + ("RUB", "Russian Ruble"), + ("RUR", "Russian Ruble (1991–1998)"), + ("RWF", "Rwandan Franc"), + ("SVC", "Salvadoran Colón"), + ("WST", "Samoan Tala"), + ("SAR", "Saudi Riyal"), + ("RSD", "Serbian Dinar"), + ("CSD", "Serbian Dinar (2002–2006)"), + ("SCR", "Seychellois Rupee"), + ("SLL", "Sierra Leonean Leone"), + ("XAG", "Silver"), + ("SGD", "Singapore Dollar"), + ("SKK", "Slovak Koruna"), + ("SIT", "Slovenian Tolar"), + ("SBD", "Solomon Islands Dollar"), + ("SOS", "Somali Shilling"), + ("ZAR", "South African Rand"), + ("ZAL", "South African Rand (financial)"), + ("KRH", "South Korean Hwan (1953–1962)"), + ("KRW", "South Korean Won"), + ("KRO", "South Korean Won (1945–1953)"), + ("SSP", "South Sudanese Pound"), + ("SUR", "Soviet Rouble"), + ("ESP", "Spanish Peseta"), + ("ESA", "Spanish Peseta (A account)"), + ("ESB", "Spanish Peseta (convertible account)"), + ("XDR", "Special Drawing Rights"), + ("LKR", "Sri Lankan Rupee"), + ("SHP", "St. Helena Pound"), + ("XSU", "Sucre"), + ("SDD", "Sudanese Dinar (1992–2007)"), + ("SDG", "Sudanese Pound"), + ("SDP", "Sudanese Pound (1957–1998)"), + ("SRD", "Surinamese Dollar"), + ("SRG", "Surinamese Guilder"), + ("SZL", "Swazi Lilangeni"), + ("SEK", "Swedish Krona"), + ("CHF", "Swiss Franc"), + ("SYP", "Syrian Pound"), + ("STN", "São Tomé & Príncipe Dobra"), + ("STD", "São Tomé & Príncipe Dobra (1977–2017)"), + ("TVD", "TVD"), + ("TJR", "Tajikistani Ruble"), + ("TJS", "Tajikistani Somoni"), + ("TZS", "Tanzanian Shilling"), + ("XTS", "Testing Currency Code"), + ("THB", "Thai Baht"), ( - 'XXX', - 'The codes assigned for transactions where no currency is involved', + "XXX", + "The codes assigned for transactions where no currency is involved", ), - ('TPE', 'Timorese Escudo'), - ('TOP', 'Tongan Paʻanga'), - ('TTD', 'Trinidad & Tobago Dollar'), - ('TND', 'Tunisian Dinar'), - ('TRY', 'Turkish Lira'), - ('TRL', 'Turkish Lira (1922–2005)'), - ('TMT', 'Turkmenistani Manat'), - ('TMM', 'Turkmenistani Manat (1993–2009)'), - ('USD', 'US Dollar'), - ('USN', 'US Dollar (Next day)'), - ('USS', 'US Dollar (Same day)'), - ('UGX', 'Ugandan Shilling'), - ('UGS', 'Ugandan Shilling (1966–1987)'), - ('UAH', 'Ukrainian Hryvnia'), - ('UAK', 'Ukrainian Karbovanets'), - ('AED', 'United Arab Emirates Dirham'), - ('UYW', 'Uruguayan Nominal Wage Index Unit'), - ('UYU', 'Uruguayan Peso'), - ('UYP', 'Uruguayan Peso (1975–1993)'), - ('UYI', 'Uruguayan Peso (Indexed Units)'), - ('UZS', 'Uzbekistani Som'), - ('VUV', 'Vanuatu Vatu'), - ('VES', 'Venezuelan Bolívar'), - ('VEB', 'Venezuelan Bolívar (1871–2008)'), - ('VEF', 'Venezuelan Bolívar (2008–2018)'), - ('VND', 'Vietnamese Dong'), - ('VNN', 'Vietnamese Dong (1978–1985)'), - ('CHE', 'WIR Euro'), - ('CHW', 'WIR Franc'), - ('XOF', 'West African CFA Franc'), - ('YDD', 'Yemeni Dinar'), - ('YER', 'Yemeni Rial'), - ('YUN', 'Yugoslavian Convertible Dinar (1990–1992)'), - ('YUD', 'Yugoslavian Hard Dinar (1966–1990)'), - ('YUM', 'Yugoslavian New Dinar (1994–2002)'), - ('YUR', 'Yugoslavian Reformed Dinar (1992–1993)'), - ('ZWN', 'ZWN'), - ('ZRN', 'Zairean New Zaire (1993–1998)'), - ('ZRZ', 'Zairean Zaire (1971–1993)'), - ('ZMW', 'Zambian Kwacha'), - ('ZMK', 'Zambian Kwacha (1968–2012)'), - ('ZWD', 'Zimbabwean Dollar (1980–2008)'), - ('ZWR', 'Zimbabwean Dollar (2008)'), - ('ZWL', 'Zimbabwean Dollar (2009)'), + ("TPE", "Timorese Escudo"), + ("TOP", "Tongan Paʻanga"), + ("TTD", "Trinidad & Tobago Dollar"), + ("TND", "Tunisian Dinar"), + ("TRY", "Turkish Lira"), + ("TRL", "Turkish Lira (1922–2005)"), + ("TMT", "Turkmenistani Manat"), + ("TMM", "Turkmenistani Manat (1993–2009)"), + ("USD", "US Dollar"), + ("USN", "US Dollar (Next day)"), + ("USS", "US Dollar (Same day)"), + ("UGX", "Ugandan Shilling"), + ("UGS", "Ugandan Shilling (1966–1987)"), + ("UAH", "Ukrainian Hryvnia"), + ("UAK", "Ukrainian Karbovanets"), + ("AED", "United Arab Emirates Dirham"), + ("UYW", "Uruguayan Nominal Wage Index Unit"), + ("UYU", "Uruguayan Peso"), + ("UYP", "Uruguayan Peso (1975–1993)"), + ("UYI", "Uruguayan Peso (Indexed Units)"), + ("UZS", "Uzbekistani Som"), + ("VUV", "Vanuatu Vatu"), + ("VES", "Venezuelan Bolívar"), + ("VEB", "Venezuelan Bolívar (1871–2008)"), + ("VEF", "Venezuelan Bolívar (2008–2018)"), + ("VND", "Vietnamese Dong"), + ("VNN", "Vietnamese Dong (1978–1985)"), + ("CHE", "WIR Euro"), + ("CHW", "WIR Franc"), + ("XOF", "West African CFA Franc"), + ("YDD", "Yemeni Dinar"), + ("YER", "Yemeni Rial"), + ("YUN", "Yugoslavian Convertible Dinar (1990–1992)"), + ("YUD", "Yugoslavian Hard Dinar (1966–1990)"), + ("YUM", "Yugoslavian New Dinar (1994–2002)"), + ("YUR", "Yugoslavian Reformed Dinar (1992–1993)"), + ("ZWN", "ZWN"), + ("ZRN", "Zairean New Zaire (1993–1998)"), + ("ZRZ", "Zairean Zaire (1971–1993)"), + ("ZMW", "Zambian Kwacha"), + ("ZMK", "Zambian Kwacha (1968–2012)"), + ("ZWD", "Zimbabwean Dollar (1980–2008)"), + ("ZWR", "Zimbabwean Dollar (2008)"), + ("ZWL", "Zimbabwean Dollar (2009)"), ], - default='USD', + default="USD", editable=False, max_length=3, ), diff --git a/foundation/migrations/0004_update_currencies.py b/foundation/migrations/0004_update_currencies.py index 1238c860..1be35a11 100644 --- a/foundation/migrations/0004_update_currencies.py +++ b/foundation/migrations/0004_update_currencies.py @@ -1,5 +1,5 @@ -from django.db import migrations import djmoney.models.fields +from django.db import migrations class Migration(migrations.Migration): diff --git a/foundation/models.py b/foundation/models.py index b4ceabda..ad36ea28 100644 --- a/foundation/models.py +++ b/foundation/models.py @@ -15,6 +15,7 @@ class Office(models.Model): An office held by a DSF Board member. """ + name = models.CharField(max_length=100, unique=True) def __str__(self): @@ -26,6 +27,7 @@ class Term(models.Model): A term in which DSF Board members served. """ + year = models.CharField(max_length=4, unique=True) def __str__(self): @@ -37,17 +39,17 @@ class BoardMember(models.Model): A DSF Board member. """ + account = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) - office = models.ForeignKey( - Office, related_name='holders', on_delete=models.CASCADE - ) + office = models.ForeignKey(Office, related_name="holders", on_delete=models.CASCADE) term = models.ForeignKey( - Term, related_name='board_members', on_delete=models.CASCADE + Term, related_name="board_members", on_delete=models.CASCADE ) def __str__(self): return "{} ({} - {})".format( - self.account.get_full_name(), self.office, self.term.year) + self.account.get_full_name(), self.office, self.term.year + ) class NonBoardAttendee(models.Model): @@ -55,12 +57,13 @@ class NonBoardAttendee(models.Model): A non-Board member attending a Board meeting. """ + name = models.CharField(max_length=255) role = models.CharField(max_length=100) class Meta: - verbose_name = 'Non-board attendee' - verbose_name_plural = 'Non-board attendees' + verbose_name = "Non-board attendee" + verbose_name_plural = "Non-board attendees" def __str__(self): return "{} ({})".format(self.name, self.role) @@ -71,46 +74,50 @@ class Meeting(models.Model): A meeting of the DSF Board. """ + date = models.DateField() title = models.CharField(max_length=255) slug = models.SlugField() - leader = models.ForeignKey(BoardMember, related_name='meetings_led', on_delete=models.CASCADE) - board_attendees = models.ManyToManyField(BoardMember, related_name='meetings_attended') + leader = models.ForeignKey( + BoardMember, related_name="meetings_led", on_delete=models.CASCADE + ) + board_attendees = models.ManyToManyField( + BoardMember, related_name="meetings_attended" + ) non_board_attendees = models.ManyToManyField( - NonBoardAttendee, related_name='meetings_attended', blank=True + NonBoardAttendee, related_name="meetings_attended", blank=True ) treasurer_balance = MoneyField( max_digits=10, decimal_places=2, - default_currency='USD', - default=Decimal('0.0'), + default_currency="USD", + default=Decimal("0.0"), ) treasurer_report = models.TextField(blank=True) treasurer_report_html = models.TextField(editable=False) def __str__(self): - return "{}, {}".format( - self.title, date_format(self.date, "F j, Y") - ) + return "{}, {}".format(self.title, date_format(self.date, "F j, Y")) def save(self, *args, **kwargs): if self.treasurer_report: self.treasurer_report_html = publish_parts( - source=self.treasurer_report, writer_name='html', - settings_overrides=BLOG_DOCUTILS_SETTINGS - )['fragment'] + source=self.treasurer_report, + writer_name="html", + settings_overrides=BLOG_DOCUTILS_SETTINGS, + )["fragment"] super().save(*args, **kwargs) def get_absolute_url(self): return reverse( - 'foundation_meeting_detail', + "foundation_meeting_detail", args=(), kwargs={ - 'year': self.date.strftime('%Y'), - 'month': self.date.strftime('%b').lower(), - 'day': self.date.strftime('%d'), - 'slug': self.slug - } + "year": self.date.strftime("%Y"), + "month": self.date.strftime("%b").lower(), + "day": self.date.strftime("%d"), + "slug": self.slug, + }, ) @@ -119,19 +126,20 @@ class ApprovedGrant(models.Model): A grant approved by the DSF Board. """ + entity = models.CharField(max_length=255) amount = MoneyField( max_digits=10, decimal_places=2, - default_currency='USD', - default=Decimal('0.0'), + default_currency="USD", + default=Decimal("0.0"), ) approved_at = models.ForeignKey( - Meeting, related_name='grants_approved', on_delete=models.CASCADE + Meeting, related_name="grants_approved", on_delete=models.CASCADE ) class Meta: - ordering = ('entity',) + ordering = ("entity",) def __str__(self): return "{}: {}".format(self.entity, self.amount) @@ -142,9 +150,10 @@ class ApprovedIndividualMember(models.Model): An individual DSF member approved by the Board. """ + name = models.CharField(max_length=255) approved_at = models.ForeignKey( - Meeting, related_name='individual_members_approved', on_delete=models.CASCADE + Meeting, related_name="individual_members_approved", on_delete=models.CASCADE ) def __str__(self): @@ -156,9 +165,10 @@ class ApprovedCorporateMember(models.Model): A corporate DSF member approved by the Board. """ + name = models.CharField(max_length=255) approved_at = models.ForeignKey( - Meeting, related_name='corporate_members_approved', on_delete=models.CASCADE + Meeting, related_name="corporate_members_approved", on_delete=models.CASCADE ) def __str__(self): @@ -170,12 +180,13 @@ class Business(models.Model): Business of the DSF Board. """ - NEW = 'new' - ONGOING = 'ongoing' + + NEW = "new" + ONGOING = "ongoing" TYPE_CHOICES = ( - (NEW, 'New'), - (ONGOING, 'Ongoing'), + (NEW, "New"), + (ONGOING, "Ongoing"), ) title = models.CharField(max_length=255) @@ -183,21 +194,22 @@ class Business(models.Model): body_html = models.TextField(editable=False) business_type = models.CharField(max_length=25, choices=TYPE_CHOICES) meeting = models.ForeignKey( - Meeting, related_name='business', on_delete=models.CASCADE + Meeting, related_name="business", on_delete=models.CASCADE ) class Meta: - ordering = ('title',) - verbose_name_plural = 'Business' + ordering = ("title",) + verbose_name_plural = "Business" def __str__(self): return self.title def save(self, *args, **kwargs): self.body_html = publish_parts( - source=self.body, writer_name='html', - settings_overrides=BLOG_DOCUTILS_SETTINGS - )['fragment'] + source=self.body, + writer_name="html", + settings_overrides=BLOG_DOCUTILS_SETTINGS, + )["fragment"] super().save(*args, **kwargs) @@ -206,10 +218,11 @@ class ActionItem(models.Model): A task to be completed by an attendee of a DSF Board meeting. """ + responsible = models.CharField(max_length=255) task = models.TextField() meeting = models.ForeignKey( - Meeting, related_name='action_items', on_delete=models.CASCADE + Meeting, related_name="action_items", on_delete=models.CASCADE ) def __str__(self): @@ -221,6 +234,7 @@ class CoreAwardCohort(models.Model): A cohort of individuals -- such as "Q1 2021" -- receiving the Django Core Developer title. """ + name = models.CharField( max_length=255, unique=True, @@ -228,7 +242,7 @@ class CoreAwardCohort(models.Model): ) description = models.TextField(blank=True) cohort_date = models.DateField( - help_text='Date this cohort was approved by the DSF Board', + help_text="Date this cohort was approved by the DSF Board", ) def __str__(self): @@ -237,23 +251,30 @@ class CoreAwardCohort(models.Model): class CoreAward(models.Model): """An individual person awarded the Django Core Developer title.""" + cohort = models.ForeignKey( - CoreAwardCohort, related_name='recipients', on_delete=models.CASCADE, + CoreAwardCohort, + related_name="recipients", + on_delete=models.CASCADE, + ) + recipient = models.CharField( + help_text="Recipient's name", max_length=1023, unique=True ) - recipient = models.CharField(help_text="Recipient's name", max_length=1023, unique=True) link = models.URLField( - blank=True, null=True, help_text='Optional link for this recipient', + blank=True, + null=True, + help_text="Optional link for this recipient", ) description = models.TextField( blank=True, help_text=( - 'Optional one-paragraph description/bio of why this person ' - 'received the award' + "Optional one-paragraph description/bio of why this person " + "received the award" ), ) class Meta: - ordering = ['recipient'] + ordering = ["recipient"] def __str__(self): return self.recipient diff --git a/foundation/templatetags/foundation.py b/foundation/templatetags/foundation.py index 5162708c..7b73641d 100644 --- a/foundation/templatetags/foundation.py +++ b/foundation/templatetags/foundation.py @@ -13,23 +13,30 @@ register = template.Library() # symbol. DJANGO = "django" -_format(DJANGO, group_size=3, group_separator=",", decimal_point=".", - positive_sign="", trailing_positive_sign="", - negative_sign="-", trailing_negative_sign="", - rounding_method=ROUND_HALF_EVEN) +_format( + DJANGO, + group_size=3, + group_separator=",", + decimal_point=".", + positive_sign="", + trailing_positive_sign="", + negative_sign="-", + trailing_negative_sign="", + rounding_method=ROUND_HALF_EVEN, +) # The DSF mostly only deals in USD with occasional grants iN EUR, but # we set up a few other currencies here just to be safe. # # Any currencies not defined here will fall back to the py-moneyed # default formatter. -_sign(DJANGO, moneyed.AUD, prefix='AUD $') -_sign(DJANGO, moneyed.CAD, prefix='CAD $') -_sign(DJANGO, moneyed.EUR, prefix='EUR €') -_sign(DJANGO, moneyed.GBP, prefix='GBP £') -_sign(DJANGO, moneyed.JPY, prefix='JPY ¥') -_sign(DJANGO, moneyed.NZD, prefix='NZD $') -_sign(DJANGO, moneyed.USD, prefix='USD $') +_sign(DJANGO, moneyed.AUD, prefix="AUD $") +_sign(DJANGO, moneyed.CAD, prefix="CAD $") +_sign(DJANGO, moneyed.EUR, prefix="EUR €") +_sign(DJANGO, moneyed.GBP, prefix="GBP £") +_sign(DJANGO, moneyed.JPY, prefix="JPY ¥") +_sign(DJANGO, moneyed.NZD, prefix="NZD $") +_sign(DJANGO, moneyed.USD, prefix="USD $") @register.filter diff --git a/foundation/urls/meetings.py b/foundation/urls/meetings.py index 54012bc9..8198567a 100644 --- a/foundation/urls/meetings.py +++ b/foundation/urls/meetings.py @@ -3,19 +3,27 @@ from django.urls import path from .. import views urlpatterns = [ - path('', - views.MeetingArchiveIndex.as_view(), - name='foundation_meeting_archive_index'), - path('<int:year>/', - views.MeetingArchiveYear.as_view(), - name='foundation_meeting_archive_year'), - path('<int:year>/<str:month>/', - views.MeetingArchiveMonth.as_view(), - name='foundation_meeting_archive_month'), - path('<int:year>/<str:month>/<int:day>/', - views.MeetingArchiveDay.as_view(), - name='foundation_meeting_archive_day'), - path('<int:year>/<str:month>/<int:day>/<str:slug>/', - views.MeetingDetail.as_view(), - name='foundation_meeting_detail'), + path( + "", views.MeetingArchiveIndex.as_view(), name="foundation_meeting_archive_index" + ), + path( + "<int:year>/", + views.MeetingArchiveYear.as_view(), + name="foundation_meeting_archive_year", + ), + path( + "<int:year>/<str:month>/", + views.MeetingArchiveMonth.as_view(), + name="foundation_meeting_archive_month", + ), + path( + "<int:year>/<str:month>/<int:day>/", + views.MeetingArchiveDay.as_view(), + name="foundation_meeting_archive_day", + ), + path( + "<int:year>/<str:month>/<int:day>/<str:slug>/", + views.MeetingDetail.as_view(), + name="foundation_meeting_detail", + ), ] diff --git a/foundation/views.py b/foundation/views.py index 60ae6e94..0cef304d 100644 --- a/foundation/views.py +++ b/foundation/views.py @@ -4,7 +4,7 @@ from . import models class MeetingMixin: - date_field = 'date' + date_field = "date" model = models.Meeting @@ -25,25 +25,37 @@ class MeetingArchiveDay(MeetingMixin, generic.DayArchiveView): class MeetingDetail(MeetingMixin, generic.DateDetailView): - context_object_name = 'meeting' + context_object_name = "meeting" def get_queryset(self): - return super().get_queryset().select_related('leader').prefetch_related( - 'grants_approved', 'individual_members_approved', 'corporate_members_approved', - 'business', 'action_items', 'board_attendees', 'non_board_attendees' + return ( + super() + .get_queryset() + .select_related("leader") + .prefetch_related( + "grants_approved", + "individual_members_approved", + "corporate_members_approved", + "business", + "action_items", + "board_attendees", + "non_board_attendees", + ) ) def get_context_data(self, **kwargs): context_data = super().get_context_data(**kwargs) - meeting = context_data['object'] - context_data['ongoing_business'] = meeting.business.filter( + meeting = context_data["object"] + context_data["ongoing_business"] = meeting.business.filter( business_type=models.Business.ONGOING ) - context_data['new_business'] = meeting.business.filter( + context_data["new_business"] = meeting.business.filter( business_type=models.Business.NEW ) return context_data class CoreDevelopers(generic.ListView): - queryset = models.CoreAwardCohort.objects.prefetch_related('recipients').order_by('-cohort_date') + queryset = models.CoreAwardCohort.objects.prefetch_related("recipients").order_by( + "-cohort_date" + ) |
