From 8be1ec0bbffd75acc41e7a31684e50df0c12ee9d Mon Sep 17 00:00:00 2001 From: David Kane Date: Tue, 17 Mar 2026 09:29:26 +0000 Subject: [PATCH 1/2] Add additional sources to be fetched from Find that Charity as described in issue #244 --- .../0014_alter_orginfocache_org_type.py | 18 ++++++++++++++++++ datastore/additional_data/models.py | 4 ++++ .../sources/find_that_charity.py | 5 +++++ 3 files changed, 27 insertions(+) create mode 100644 datastore/additional_data/migrations/0014_alter_orginfocache_org_type.py diff --git a/datastore/additional_data/migrations/0014_alter_orginfocache_org_type.py b/datastore/additional_data/migrations/0014_alter_orginfocache_org_type.py new file mode 100644 index 00000000..e3a2e36f --- /dev/null +++ b/datastore/additional_data/migrations/0014_alter_orginfocache_org_type.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.28 on 2026-03-17 09:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('additional_data', '0013_alter_orginfocache_org_type'), + ] + + operations = [ + migrations.AlterField( + model_name='orginfocache', + name='org_type', + field=models.CharField(choices=[('casc', 'Community Amateur Sports Clubs regulated by HMRC'), ('ccew', 'Registered charities in England and Wales'), ('ccni', 'Registered charities in Northern Ireland'), ('oscr', 'Registered charities in Scotland'), ('companies', 'Companies registered with Companies House (the scraper only imports non-profit company types)'), ('mutuals', 'Mutual societies registered with the Financial Conduct Authority'), ('gor', 'A register of government organisations'), ('ror', 'Research Organisation Registry (formerly GRID) - only those that are based in the UK and are not a registered company are included.'), ('coe', 'Church of England'), ('officeforstudents', 'Office for Students'), ('hesa', 'Organisations covered by the Higher Education Statistics Agency.'), ('lae', 'Register of local authorities in England'), ('lani', 'Register of local authorities in Northern Ireland'), ('las', 'Register of local authorities in Scotland'), ('pla', 'Register of principal local authorities in Wales'), ('nhsods-epraccur', 'NHS organisations'), ('nhsods-etr', 'NHS organisations'), ('nhsods-ensa', 'NHS organisations'), ('nhsods-eccg', 'NHS organisations'), ('nhsods-ecsu', 'NHS organisations'), ('nhsods-espha', 'NHS organisations'), ('nhsods-wlhb', 'NHS organisations'), ('nhsods-ect', 'NHS organisations'), ('rsl', 'Registered social landlords'), ('schools_gias', 'Schools in England (also includes Universities)'), ('schools_ni', 'Schools in Northern Ireland'), ('schools_scotland', 'Schools in Scotland'), ('schools_wales', 'Schools in Wales')], max_length=20), + ), + ] diff --git a/datastore/additional_data/models.py b/datastore/additional_data/models.py index 4a360ca7..6ece5cd8 100644 --- a/datastore/additional_data/models.py +++ b/datastore/additional_data/models.py @@ -23,6 +23,8 @@ class OrgInfoCache(models.Model): LANI = "lani" LAS = "las" PLA = "pla" + COE = "coe" + OFFICEFORSTUDENTS = "officeforstudents" NHSODS_EPRACCUR = "nhsods-epraccur" NHSODS_ETR = "nhsods-etr" NHSODS_ENSA = "nhsods-ensa" @@ -52,6 +54,8 @@ class OrgInfoCache(models.Model): ROR, "Research Organisation Registry (formerly GRID) - only those that are based in the UK and are not a registered company are included.", ), + (COE, "Church of England"), + (OFFICEFORSTUDENTS, "Office for Students"), (HESA, "Organisations covered by the Higher Education Statistics Agency."), (LAE, "Register of local authorities in England"), (LANI, "Register of local authorities in Northern Ireland"), diff --git a/datastore/additional_data/sources/find_that_charity.py b/datastore/additional_data/sources/find_that_charity.py index 3d202f97..fb365935 100644 --- a/datastore/additional_data/sources/find_that_charity.py +++ b/datastore/additional_data/sources/find_that_charity.py @@ -26,6 +26,11 @@ ("https://findthatcharity.uk/orgid/source/lani.csv", OrgInfoCache.LANI), ("https://findthatcharity.uk/orgid/source/las.csv", OrgInfoCache.LAS), ("https://findthatcharity.uk/orgid/source/pla.csv", OrgInfoCache.PLA), + ("https://findthatcharity.uk/orgid/source/coe.csv", OrgInfoCache.COE), + ( + "https://findthatcharity.uk/orgid/source/officeforstudents.csv", + OrgInfoCache.OFFICEFORSTUDENTS, + ), ( "https://findthatcharity.uk/orgid/source/nhsods-epraccur.csv", OrgInfoCache.NHSODS_EPRACCUR, From eab2205ce82bca2ad744bc4abfe7119d05088782 Mon Sep 17 00:00:00 2001 From: David Kane Date: Tue, 17 Mar 2026 09:59:00 +0000 Subject: [PATCH 2/2] black formatting --- .../0014_alter_orginfocache_org_type.py | 52 +++++++++++++++++-- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/datastore/additional_data/migrations/0014_alter_orginfocache_org_type.py b/datastore/additional_data/migrations/0014_alter_orginfocache_org_type.py index e3a2e36f..b5e1df7e 100644 --- a/datastore/additional_data/migrations/0014_alter_orginfocache_org_type.py +++ b/datastore/additional_data/migrations/0014_alter_orginfocache_org_type.py @@ -6,13 +6,57 @@ class Migration(migrations.Migration): dependencies = [ - ('additional_data', '0013_alter_orginfocache_org_type'), + ("additional_data", "0013_alter_orginfocache_org_type"), ] operations = [ migrations.AlterField( - model_name='orginfocache', - name='org_type', - field=models.CharField(choices=[('casc', 'Community Amateur Sports Clubs regulated by HMRC'), ('ccew', 'Registered charities in England and Wales'), ('ccni', 'Registered charities in Northern Ireland'), ('oscr', 'Registered charities in Scotland'), ('companies', 'Companies registered with Companies House (the scraper only imports non-profit company types)'), ('mutuals', 'Mutual societies registered with the Financial Conduct Authority'), ('gor', 'A register of government organisations'), ('ror', 'Research Organisation Registry (formerly GRID) - only those that are based in the UK and are not a registered company are included.'), ('coe', 'Church of England'), ('officeforstudents', 'Office for Students'), ('hesa', 'Organisations covered by the Higher Education Statistics Agency.'), ('lae', 'Register of local authorities in England'), ('lani', 'Register of local authorities in Northern Ireland'), ('las', 'Register of local authorities in Scotland'), ('pla', 'Register of principal local authorities in Wales'), ('nhsods-epraccur', 'NHS organisations'), ('nhsods-etr', 'NHS organisations'), ('nhsods-ensa', 'NHS organisations'), ('nhsods-eccg', 'NHS organisations'), ('nhsods-ecsu', 'NHS organisations'), ('nhsods-espha', 'NHS organisations'), ('nhsods-wlhb', 'NHS organisations'), ('nhsods-ect', 'NHS organisations'), ('rsl', 'Registered social landlords'), ('schools_gias', 'Schools in England (also includes Universities)'), ('schools_ni', 'Schools in Northern Ireland'), ('schools_scotland', 'Schools in Scotland'), ('schools_wales', 'Schools in Wales')], max_length=20), + model_name="orginfocache", + name="org_type", + field=models.CharField( + choices=[ + ("casc", "Community Amateur Sports Clubs regulated by HMRC"), + ("ccew", "Registered charities in England and Wales"), + ("ccni", "Registered charities in Northern Ireland"), + ("oscr", "Registered charities in Scotland"), + ( + "companies", + "Companies registered with Companies House (the scraper only imports non-profit company types)", + ), + ( + "mutuals", + "Mutual societies registered with the Financial Conduct Authority", + ), + ("gor", "A register of government organisations"), + ( + "ror", + "Research Organisation Registry (formerly GRID) - only those that are based in the UK and are not a registered company are included.", + ), + ("coe", "Church of England"), + ("officeforstudents", "Office for Students"), + ( + "hesa", + "Organisations covered by the Higher Education Statistics Agency.", + ), + ("lae", "Register of local authorities in England"), + ("lani", "Register of local authorities in Northern Ireland"), + ("las", "Register of local authorities in Scotland"), + ("pla", "Register of principal local authorities in Wales"), + ("nhsods-epraccur", "NHS organisations"), + ("nhsods-etr", "NHS organisations"), + ("nhsods-ensa", "NHS organisations"), + ("nhsods-eccg", "NHS organisations"), + ("nhsods-ecsu", "NHS organisations"), + ("nhsods-espha", "NHS organisations"), + ("nhsods-wlhb", "NHS organisations"), + ("nhsods-ect", "NHS organisations"), + ("rsl", "Registered social landlords"), + ("schools_gias", "Schools in England (also includes Universities)"), + ("schools_ni", "Schools in Northern Ireland"), + ("schools_scotland", "Schools in Scotland"), + ("schools_wales", "Schools in Wales"), + ], + max_length=20, + ), ), ]