All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: yocto@yoctoproject.org
Subject: [layerindex-web][PATCH 2/3] models: allow LayerBranch.collection to be blank
Date: Wed,  4 Oct 2017 13:51:02 +1300	[thread overview]
Message-ID: <20171004005103.24756-2-paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <20171004005103.24756-1-paul.eggleton@linux.intel.com>

It's really irritating to be forced to specify a value for this field
especially as it'll get auto-populated by the update script. Set
blank=True to allow that. While we're at it, touch up the description a
bit to make more sense.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 layerindex/migrations/0009_layerbranch_collection.py | 19 +++++++++++++++++++
 layerindex/models.py                                 |  2 +-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 layerindex/migrations/0009_layerbranch_collection.py

diff --git a/layerindex/migrations/0009_layerbranch_collection.py b/layerindex/migrations/0009_layerbranch_collection.py
new file mode 100644
index 0000000..bf6276f
--- /dev/null
+++ b/layerindex/migrations/0009_layerbranch_collection.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('layerindex', '0008_yp_compatible'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='layerbranch',
+            name='collection',
+            field=models.CharField(help_text='Name of the collection that the layer provides for the purpose of expressing dependencies (as specified in BBFILE_COLLECTIONS). Can only contain letters, numbers and dashes.', max_length=40, blank=True, null=True, verbose_name='Layer Collection'),
+        ),
+    ]
diff --git a/layerindex/models.py b/layerindex/models.py
index e99f0b8..b39518a 100644
--- a/layerindex/models.py
+++ b/layerindex/models.py
@@ -157,7 +157,7 @@ class YPCompatibleVersion(models.Model):
 class LayerBranch(models.Model):
     layer = models.ForeignKey(LayerItem)
     branch = models.ForeignKey(Branch)
-    collection = models.CharField('Layer Collection', max_length=40, null=True, help_text='Name of the layer that could be used in the list of dependencies - can only contain letters, numbers and dashes')
+    collection = models.CharField('Layer Collection', max_length=40, null=True, blank=True, help_text='Name of the collection that the layer provides for the purpose of expressing dependencies (as specified in BBFILE_COLLECTIONS). Can only contain letters, numbers and dashes.')
     version = models.CharField('Layer Version', max_length=10, null=True, blank=True, help_text='The layer version for this particular branch.')
     vcs_subdir = models.CharField('Repository subdirectory', max_length=40, blank=True, help_text='Subdirectory within the repository where the layer is located, if not in the root (usually only used if the repository contains more than one layer)')
     vcs_last_fetch = models.DateTimeField('Last successful fetch', blank=True, null=True)
-- 
2.9.5



  reply	other threads:[~2017-10-04  0:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04  0:51 [layerindex-web][PATCH 1/3] update: allow preserving temp directory Paul Eggleton
2017-10-04  0:51 ` Paul Eggleton [this message]
2017-10-04  0:51 ` [layerindex-web][PATCH 3/3] Show note if layer branch hasn't been indexed Paul Eggleton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171004005103.24756-2-paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.