From patchwork Sat Jan 15 11:52:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Wallenstein X-Patchwork-Id: 79051 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 9E0F1B70B3 for ; Sat, 15 Jan 2011 22:52:24 +1100 (EST) Received: from mailout08.t-online.de (mailout08.t-online.de [194.25.134.20]) by ozlabs.org (Postfix) with ESMTP id 7238FB708B for ; Sat, 15 Jan 2011 22:52:22 +1100 (EST) Received: from fwd03.aul.t-online.de (fwd03.aul.t-online.de ) by mailout08.t-online.de with smtp id 1Pe4g7-0006ud-MO; Sat, 15 Jan 2011 12:52:19 +0100 Received: from localhost.localdomain (VU0c0QZbQh5GUaQ9bBgsmwxooGY4pfSvxUrCG0GI5ckT8HwKEdt-YmGzU-60t-OgXB@[84.139.70.41]) by fwd03.t-online.de with esmtp id 1Pe4fx-1Lruq00; Sat, 15 Jan 2011 12:52:09 +0100 From: Dirk Wallenstein To: patchwork@lists.ozlabs.org Subject: [PATCH] Don't require optional model fields in forms Date: Sat, 15 Jan 2011 12:52:07 +0100 Message-Id: <1295092327-15376-1-git-send-email-halsmit@t-online.de> X-Mailer: git-send-email 1.7.3.2 X-ID: VU0c0QZbQh5GUaQ9bBgsmwxooGY4pfSvxUrCG0GI5ckT8HwKEdt-YmGzU-60t-OgXB X-TOI-MSGID: d91bc766-8987-46f1-b4ea-c5f9293a8b86 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org The keyword 'blank' concerns only validation and does not change what will be stored in the database. Signed-off-by: Dirk Wallenstein --- apps/patchwork/models.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py index 5c0ca95..3989694 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, @@ -189,7 +189,7 @@ class Patch(models.Model): archived = models.BooleanField(default = False) headers = models.TextField(blank = True) content = models.TextField(null = True) - pull_url = models.CharField(max_length=255, null = 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)