Created
January 25, 2016 02:50
-
-
Save mekhami/5b337bb8fc7fc0967049 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| from django.db import models | |
| # Create your models here. | |
| class Legislator(models.Model): | |
| PARTIES = ( | |
| ('R', 'Republican'), | |
| ('D', 'Democrat'), | |
| ('I', 'Independent'), | |
| ('G', 'Green'), | |
| ) | |
| STATES = ( | |
| ('AL', 'Alabama'), | |
| ('AK', 'Alaska'), | |
| ('AS', 'American Samoa'), | |
| ('AZ', 'Arizona'), | |
| ('AR', 'Arkansas'), | |
| ('CA', 'California'), | |
| ('CO', 'Colorado'), | |
| ('CT', 'Connecticut'), | |
| ('DE', 'Delaware'), | |
| ('DC', 'District of Columbia'), | |
| ('FL', 'Florida'), | |
| ('GA', 'Georgia'), | |
| ('GU', 'Guam'), | |
| ('HI', 'Hawaii'), | |
| ('ID', 'Idaho'), | |
| ('IL', 'Illinois'), | |
| ('IN', 'Indiana'), | |
| ('IA', 'Iowa'), | |
| ('KS', 'Kansas'), | |
| ('KY', 'Kentucky'), | |
| ('LA', 'Louisiana'), | |
| ('ME', 'Maine'), | |
| ('MD', 'Maryland'), | |
| ('MH', 'Marshall Islands'), | |
| ('MA', 'Massachusetts'), | |
| ('MI', 'Michigan'), | |
| ('FM', 'Micronesia'), | |
| ('MN', 'Minnesota'), | |
| ('MS', 'Mississippi'), | |
| ('MO', 'Missouri'), | |
| ('MT', 'Montana'), | |
| ('NE', 'Nebraska'), | |
| ('NV', 'Nevada'), | |
| ('NH', 'New Hampshire'), | |
| ('NJ', 'New Jersey'), | |
| ('NM', 'New Mexico'), | |
| ('NY', 'New York'), | |
| ('NC', 'North Carolina'), | |
| ('ND', 'North Dakota'), | |
| ('MP', 'Northern Marianas'), | |
| ('OH', 'Ohio'), | |
| ('OK', 'Oklahoma'), | |
| ('OR', 'Oregon'), | |
| ('PW', 'Palau'), | |
| ('PA', 'Pennsylvania'), | |
| ('PR', 'Puerto Rico'), | |
| ('RI', 'Rhode Island'), | |
| ('SC', 'South Carolina'), | |
| ('SD', 'South Dakota'), | |
| ('TN', 'Tennessee'), | |
| ('TX', 'Texas'), | |
| ('UT', 'Utah'), | |
| ('VT', 'Vermont'), | |
| ('VA', 'Virginia'), | |
| ('VI', 'Virgin Islands'), | |
| ('WA', 'Washington'), | |
| ('WV', 'West Virginia'), | |
| ('WI', 'Wisconsin'), | |
| ('WY', 'Wyoming'), | |
| ) | |
| GENDERS = ( | |
| ('M', 'Male'), | |
| ('F', 'Female'), | |
| ('O', 'Other'), | |
| ) | |
| CHAMBERS = ( | |
| ('H', 'House'), | |
| ('S', 'Senate'), | |
| ) | |
| bioguide_id = models.CharField(max_length=7) | |
| birthday = models.CharField(max_length=10) | |
| chamber = models.CharField(choices=CHAMBERS, max_length=2) | |
| contact_form = models.URLField(null=True, blank=True) | |
| crp_id = models.CharField(max_length=10, null=True, blank=True) | |
| district = models.IntegerField(null=True, blank=True) | |
| facebook_id = models.CharField(max_length=30, null=True, blank=True) | |
| fax = models.IntegerField(null=True, blank=True) | |
| first_name = models.CharField(max_length=30) | |
| gender = models.CharField(choices=GENDERS, max_length=1) | |
| govtrack_id = models.CharField(max_length=10, blank=True, null=True) | |
| in_office = models.BooleanField() | |
| last_name = models.CharField(max_length=30) | |
| leadership_role = models.CharField(max_length=254, null=True, blank=True) | |
| middle_name = models.CharField(max_length=20, blank=True, null=True) | |
| name_suffix = models.CharField(max_length=15, blank=True, null=True) | |
| nickname = models.CharField(max_length=15, blank=True, null=True) | |
| oc_email = models.EmailField(blank=True, null=True) | |
| ocd_id = models.CharField(max_length=100, blank=True, null=True) | |
| office = models.CharField(max_length=50, blank=True, null=True) | |
| party = models.CharField(choices=PARTIES, max_length=1, blank=True) | |
| phone = models.CharField(max_length=14, blank=True) | |
| state = models.CharField(choices=STATES, max_length=2) | |
| state_name = models.CharField(max_length=20) | |
| term_end = models.DateField() | |
| term_start = models.DateField() | |
| thomas_id = models.IntegerField(blank=True, null=True) | |
| title = models.CharField(max_length=15, blank=True, null=True) | |
| twitter_id = models.CharField(max_length=20, blank=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment