Commit ba3482a3 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

Target: add python3 version info

parent 29cbee2f
# Generated by Django 2.0.5 on 2018-05-16 08:51
from django.db import migrations, models
DIST_PYTHON3 = {
'3.4': ['14.04', 'dubnium', 'jessie'],
'3.5': ['16.04'],
'3.6': ['17.10', '18.04'],
}
def add_python3(apps, schema_editor):
Target = apps.get_model('rainboard', 'Target')
for python3, names in DIST_PYTHON3.items():
Target.objects.filter(name__in=names).update(python3=python3)
class Migration(migrations.Migration):
dependencies = [
('rainboard', '0012_target'),
]
operations = [
migrations.AddField(
model_name='target',
name='python3',
field=models.CharField(blank=True, max_length=3, null=True),
),
migrations.RunPython(add_python3),
]
......@@ -505,7 +505,7 @@ class Branch(TimeStampedModel):
class Target(NamedModel):
pass
python3 = models.CharField(max_length=3, blank=True, null=True)
# class Test(TimeStampedModel):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment