-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5094 from cfpb/regs3k-short-name
Regulations: Deprecate letter codes in favor of short names
- Loading branch information
Showing
19 changed files
with
121 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1004", "letter_code": "D", "title": "Alternative Mortgage Transaction Parity"}, "model": "regulations3k.part", "pk": 3}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1005", "letter_code": "E", "title": "Electronic Fund Transfers"}, "model": "regulations3k.part", "pk": 4}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1010", "letter_code": "J", "title": "Land Registration"}, "model": "regulations3k.part", "pk": 5}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1011", "letter_code": "K", "title": "Purchasers' Revocation Rights, Sales Practices And Standards"}, "model": "regulations3k.part", "pk": 6}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1012", "letter_code": "L", "title": "Special Rules Of Practice"}, "model": "regulations3k.part", "pk": 7}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1013", "letter_code": "M", "title": "Consumer Leasing"}, "model": "regulations3k.part", "pk": 8}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1024", "letter_code": "X", "title": "Real Estate Settlement Procedures Act"}, "model": "regulations3k.part", "pk": 9}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1030", "letter_code": "DD", "title": "Truth In Savings"}, "model": "regulations3k.part", "pk": 11}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1003", "letter_code": "C", "title": "Home Mortgage Disclosure"}, "model": "regulations3k.part", "pk": 1003}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1026", "letter_code": "Z", "title": "Truth In Lending"}, "model": "regulations3k.part", "pk": 1026}] | ||
[{"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1004", "short_name": "Regulation D", "title": "Alternative Mortgage Transaction Parity"}, "model": "regulations3k.part", "pk": 3}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1005", "short_name": "Regulation E", "title": "Electronic Fund Transfers"}, "model": "regulations3k.part", "pk": 4}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1010", "short_name": "Regulation J", "title": "Land Registration"}, "model": "regulations3k.part", "pk": 5}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1011", "short_name": "Regulation K", "title": "Purchasers' Revocation Rights, Sales Practices And Standards"}, "model": "regulations3k.part", "pk": 6}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1012", "short_name": "Regulation L", "title": "Special Rules Of Practice"}, "model": "regulations3k.part", "pk": 7}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1013", "short_name": "Regulation M", "title": "Consumer Leasing"}, "model": "regulations3k.part", "pk": 8}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1024", "short_name": "Regulation X", "title": "Real Estate Settlement Procedures Act"}, "model": "regulations3k.part", "pk": 9}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1030", "short_name": "Regulation DD", "title": "Truth In Savings"}, "model": "regulations3k.part", "pk": 11}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1003", "short_name": "Regulation C", "title": "Home Mortgage Disclosure"}, "model": "regulations3k.part", "pk": 1003}, {"fields": {"cfr_title_number": "12", "chapter": "X", "part_number": "1026", "short_name": "Regulation Z", "title": "Truth In Lending"}, "model": "regulations3k.part", "pk": 1026}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.20 on 2019-06-27 15:05 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('regulations3k', '0024_add_standard_notification_regs_landing'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='part', | ||
name='short_name', | ||
field=models.CharField(blank=True, max_length=255), | ||
), | ||
] |
33 changes: 33 additions & 0 deletions
33
cfgov/regulations3k/migrations/0026_migrate_letter_code_to_short_name.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.20 on 2019-06-27 15:06 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
def forwards(apps, schema_editor): | ||
Part = apps.get_model('regulations3k', 'Part') | ||
for part in Part.objects.all(): | ||
part.short_name = 'Regulation ' + part.letter_code | ||
part.save() | ||
|
||
|
||
def backwards(apps, schema_editor): | ||
Part = apps.get_model('regulations3k', 'Part') | ||
for part in Part.objects.all(): | ||
if part.startswith('Regulation '): | ||
part.letter_code = part.short_name[11:] | ||
else: | ||
part.letter_code = '' | ||
part.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('regulations3k', '0025_part_short_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(forwards, backwards), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.