Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Generated by Django 5.2.13 on 2026-06-05 14:30

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("candidates", "0092_alter_ballot_by_election_reason"),
]

operations = [
migrations.AlterField(
model_name="ballot",
name="by_election_reason",
field=models.CharField(
blank=True,
choices=[
("DEATH", "The elected member died"),
("RESIGNATION", "The elected member resigned"),
(
"ELECTORAL_COURT",
"The election of the elected member was declared void by an election court",
),
(
"FAILURE_TO_ACCEPT",
"The previous election winner did not sign a declaration of acceptance",
),
(
"FAILURE_TO_ATTEND_MEETINGS",
"The elected member failed to attend meetings for six months",
),
("DISQUALIFICATION", "The elected member was disqualified"),
(
"LOSING_QUALIFICATION",
"The elected member no longer qualified as a registered elector",
),
(
"RECALL_PETITION",
"The elected member was recalled by a successful recall petition",
),
(
"ELECTED_COUNCIL_MAYOR",
"The elected member was elected mayor of the council, and cannot hold both positions.",
),
(
"ELECTED_PARLIAMENT",
"The elected member was elected Member of the UK Parliament, and cannot hold both positions.",
),
(
"ELECTED_STRATEGIC_AUTHORITY_MAYOR",
"The elected member was elected mayor of a strategic authority, and cannot hold both positions.",
),
(
"ELECTED_SENEDD",
"The elected member was elected Member of the Senedd, and cannot hold both positions.",
),
(
"ELECTED_SCOTTISH_PARLIAMENT",
"The elected member was elected Member of the Scottish Parliament, and cannot hold both positions.",
),
("OTHER", "Other"),
("UNKNOWN", "Unknown"),
("", "Neither a by-election nor a ballot"),
],
default="",
help_text='\n Reasons why a by-election may be triggered.\n\n Not all of these can be applied to all election types.\n\n e.g. a recall petition is only used in Westminster, and failure to attend meetings\n applies to local government.\n\n An empty string represents ballots that are not applicable, e.g because they\'re not by-elections.\n\n The choices here are in part based on:\n UK Electoral Commission guidance on casual vacancies:\n <a href="https://www.electoralcommission.org.uk/guidance-returning-officers-administering-local-government-elections-england/casual-vacancies-and-elections/how-casual-vacancies-occur">https://www.electoralcommission.org.uk/guidance-returning-officers-administering-local-government-elections-england/casual-vacancies-and-elections/how-casual-vacancies-occur</a>\n\n \'Disqualification\' can be caused by an elected member being elected to another position.\n Since \'DISQUALIFICATION\' sounds bad, we\'ve made special cases for by-elections triggered\n because the member was elected to another position and is disqualified from holding both.\n In these cases the legislation is:\n <a href="https://www.legislation.gov.uk/ukpga/2000/22/section/9HA">https://www.legislation.gov.uk/ukpga/2000/22/section/9HA</a> (ELECTED_COUNCIL_MAYOR)\n <a href="https://commonslibrary.parliament.uk/research-briefings/cbp-10853/">https://commonslibrary.parliament.uk/research-briefings/cbp-10853/</a> (ELECTED_PARLIAMENT)\n <a href="https://commonslibrary.parliament.uk/research-briefings/cbp-10853/">https://commonslibrary.parliament.uk/research-briefings/cbp-10853/</a> (ELECTED_STRATEGIC_AUTHORITY_MAYOR)\n <a href="https://www.legislation.gov.uk/ukpga/2006/32/part/1/crossheading/disqualification">https://www.legislation.gov.uk/ukpga/2006/32/part/1/crossheading/disqualification</a> (ELECTED_SENEDD)\n <a href="https://www.legislation.gov.uk/ukpga/1998/46/part/I/crossheading/disqualification">https://www.legislation.gov.uk/ukpga/1998/46/part/I/crossheading/disqualification</a> (ELECTED_SCOTTISH_PARLIAMENT)\n ',
max_length=40,
),
),
]
10 changes: 5 additions & 5 deletions ynr/apps/candidates/models/popolo_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,23 +123,23 @@ class ByElectionReason(models.TextChoices):
)
ELECTED_COUNCIL_MAYOR = (
"ELECTED_COUNCIL_MAYOR",
"This by-election was called because the elected member was elected mayor of the council, and cannot hold both positions.",
"The elected member was elected mayor of the council, and cannot hold both positions.",
)
ELECTED_PARLIAMENT = (
"ELECTED_PARLIAMENT",
"This by-election was called because the elected member was elected Member of the UK Parliament, and cannot hold both positions.",
"The elected member was elected Member of the UK Parliament, and cannot hold both positions.",
)
ELECTED_STRATEGIC_AUTHORITY_MAYOR = (
"ELECTED_STRATEGIC_AUTHORITY_MAYOR",
"This by-election was called because the elected member was elected mayor of a strategic authority, and cannot hold both positions.",
"The elected member was elected mayor of a strategic authority, and cannot hold both positions.",
)
ELECTED_SENEDD = (
"ELECTED_SENEDD",
"This by-election was called because the elected member was elected Member of the Senedd, and cannot hold both positions.",
"The elected member was elected Member of the Senedd, and cannot hold both positions.",
)
ELECTED_SCOTTISH_PARLIAMENT = (
"ELECTED_SCOTTISH_PARLIAMENT",
"This by-election was called because the elected member was elected Member of the Scottish Parliament, and cannot hold both positions.",
"The elected member was elected Member of the Scottish Parliament, and cannot hold both positions.",
)
OTHER = "OTHER", "Other"
UNKNOWN = "UNKNOWN", "Unknown"
Expand Down