mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-06 05:34:46 +02:00

Comparison updates might involve some custom fetch process, so provide a mechanism to register these via settings.py on a per-branch basis. If an update command is defined for a branch and the logged-in user has the new "update_comparison_branch" permission, an "Update" button will show up on the recipes page for the comparison branch for authenticated users that will trigger the command in the background (as a celery job) and then show a page that displays the status. The status isn't shown in real-time since that requires quite a lot of plumbing, but the page at least auto-refreshes. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
51 lines
1.9 KiB
Python
51 lines
1.9 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.11.12 on 2018-06-07 04:55
|
|
from __future__ import unicode_literals
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
('layerindex', '0019_layeritem_classic_comparison'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='ComparisonRecipeUpdate',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('meta_updated', models.BooleanField(default=False)),
|
|
('link_updated', models.BooleanField(default=False)),
|
|
],
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='classicrecipe',
|
|
options={'permissions': (('edit_classic', 'Can edit OE-Classic recipes'), ('update_comparison_branch', 'Can update comparison branches'))},
|
|
),
|
|
migrations.AddField(
|
|
model_name='update',
|
|
name='task_id',
|
|
field=models.CharField(blank=True, db_index=True, max_length=50),
|
|
),
|
|
migrations.AddField(
|
|
model_name='update',
|
|
name='triggered_by',
|
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
|
|
),
|
|
migrations.AddField(
|
|
model_name='comparisonrecipeupdate',
|
|
name='recipe',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='layerindex.ClassicRecipe'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='comparisonrecipeupdate',
|
|
name='update',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='layerindex.Update'),
|
|
),
|
|
]
|