mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00

Allow admin to create Yocto Project versions with the version name, description, an icon link that represents that version, and a link that contains more information about the version. Admins who have the "set_yp_compatibility" permission can then decide if a layer has Yocto Project compatible certification, and if it does, admin can choose which version of Yocto Project the layer is compatible with. If a layer is deemed compatible, the version's icon will appear next to the layer's name, and the icon be a clickable link to a page with more information. Fixes [YOCTO #11452] Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
39 lines
1.7 KiB
Python
39 lines
1.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('layerindex', '0007_layeritem_status_noupdate'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='YPCompatibleVersion',
|
|
fields=[
|
|
('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)),
|
|
('name', models.CharField(help_text='Name of this Yocto Project compatible version (e.g. "2.0")', verbose_name='Yocto Project Version', max_length=25, unique=True)),
|
|
('description', models.TextField(blank=True)),
|
|
('image_url', models.CharField(blank=True, verbose_name='Image URL', max_length=300)),
|
|
('link_url', models.CharField(blank=True, verbose_name='Link URL', max_length=100)),
|
|
],
|
|
options={
|
|
'ordering': ('name',),
|
|
'verbose_name': 'Yocto Project Compatible version',
|
|
},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='layerbranch',
|
|
options={'verbose_name_plural': 'Layer branches', 'permissions': (('set_yp_compatibility', 'Can set YP compatibility'),)},
|
|
),
|
|
migrations.AddField(
|
|
model_name='layerbranch',
|
|
name='yp_compatible_version',
|
|
field=models.ForeignKey(to='layerindex.YPCompatibleVersion', blank=True, help_text='Which version of the Yocto Project Compatible program has this layer been approved for for?', verbose_name='Yocto Project Compatible version', on_delete=django.db.models.deletion.SET_NULL, null=True),
|
|
),
|
|
]
|