X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Fmodels.py;h=134e12f7f30bb0b74360986ce78822742770352f;hb=ab21927af7fa4003a0da8986c8448cb4cb134d6c;hp=5c0ca9550bf08f6cf058bbd538f66b754894ac3b;hpb=47c56dfaceefaa44e5057236a5b63a05f68a981d;p=patchwork diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py index 5c0ca95..134e12f 100644 --- a/apps/patchwork/models.py +++ b/apps/patchwork/models.py @@ -44,8 +44,8 @@ except ImportError: class Person(models.Model): email = models.CharField(max_length=255, unique = True) - name = models.CharField(max_length=255, null = True) - user = models.ForeignKey(User, null = True) + name = models.CharField(max_length=255, null = True, blank = True) + user = models.ForeignKey(User, null = True, blank = True) def __unicode__(self): if self.name: @@ -71,7 +71,7 @@ class Project(models.Model): class UserProfile(models.Model): user = models.ForeignKey(User, unique = True) - primary_project = models.ForeignKey(Project, null = True) + primary_project = models.ForeignKey(Project, null = True, blank = True) maintainer_projects = models.ManyToManyField(Project, related_name = 'maintainer_project') send_email = models.BooleanField(default = False, @@ -188,10 +188,10 @@ class Patch(models.Model): state = models.ForeignKey(State) archived = models.BooleanField(default = False) headers = models.TextField(blank = True) - content = models.TextField(null = True) - pull_url = models.CharField(max_length=255, null = True) + content = models.TextField(null = True, blank = True) + pull_url = models.CharField(max_length=255, null = True, blank = True) commit_ref = models.CharField(max_length=255, null = True, blank = True) - hash = HashField(null = True, db_index = True) + hash = HashField(null = True, blank = True) def __unicode__(self): return self.name