Commits

Mikela Clemmons  committed e83eccd

added phone and migratiion

  • Participants
  • Parent commits 337bd2d

Comments (0)

Files changed (3)

 syntax: glob
 *.pyc
 *.cfg
+*.egg-info

File committees/migrations/000_add_phone.sql

+begin;
+ALTER TABLE committees_profile ADD column phone varchar(20);
+UPDATE committees_profile SET phone='';
+ALTER TABLE committees_profile alter phone set NOT NULL;
+commit;

File committees/models.py

 from django.db import models
-
+from django.contrib.localflavor.us.models import PhoneNumberField
 
 class Profile(models.Model):
     first_name = models.CharField(max_length=50)
     email = models.EmailField(blank=True)
     description = models.TextField(blank=True)
     photo = models.ImageField(blank=True, upload_to='profile-photo')
-
+    phone = PhoneNumberField(blank=True)
+    
     class Meta:
         ordering = ('last_name', 'first_name')