Skip to content

Instantly share code, notes, and snippets.

@johnpneumann
Created April 18, 2013 16:20
Show Gist options
  • Save johnpneumann/5414051 to your computer and use it in GitHub Desktop.
Save johnpneumann/5414051 to your computer and use it in GitHub Desktop.
Was using django-localflavor-us, but we needed an abbreviated list instead of the US_STATES that comes with it. So I yanked that, recorded a macro in vim and it did the work for me.
ABBR_US_STATES = (
('AL', 'AL'),
('AK', 'AK'),
('AZ', 'AZ'),
('AR', 'AR'),
('CA', 'CA'),
('CO', 'CO'),
('CT', 'CT'),
('DE', 'DE'),
('DC', 'DC'),
('FL', 'FL'),
('GA', 'GA'),
('HI', 'HI'),
('ID', 'ID'),
('IL', 'IL'),
('IN', 'IN'),
('IA', 'IA'),
('KS', 'KS'),
('KY', 'KY'),
('LA', 'LA'),
('ME', 'ME'),
('MD', 'MD'),
('MA', 'MA'),
('MI', 'MI'),
('MN', 'MN'),
('MS', 'MS'),
('MO', 'MO'),
('MT', 'MT'),
('NE', 'NE'),
('NV', 'NV'),
('NH', 'NH'),
('NJ', 'NJ'),
('NM', 'NM'),
('NY', 'NY'),
('NC', 'NC'),
('ND', 'ND'),
('OH', 'OH'),
('OK', 'OK'),
('OR', 'OR'),
('PA', 'PA'),
('RI', 'RI'),
('SC', 'SC'),
('SD', 'SD'),
('TN', 'TN'),
('TX', 'TX'),
('UT', 'UT'),
('VT', 'VT'),
('VA', 'VA'),
('WA', 'WA'),
('WV', 'WV'),
('WI', 'WI'),
('WY', 'WY'),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment