This commit is contained in:
Jared Kerim 2017-01-20 21:07:10 +00:00
Родитель 77c2955f2a
Коммит 71ba732345
2 изменённых файлов: 12 добавлений и 7 удалений

Просмотреть файл

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-25 19:50
# Generated by Django 1.10.5 on 2017-01-19 19:17
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
@ -31,16 +31,16 @@ class Migration(migrations.Migration):
('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='projects.Project')),
],
options={
'verbose_name_plural': 'Experiments',
'verbose_name': 'Experiment',
'verbose_name_plural': 'Experiments',
},
),
migrations.CreateModel(
name='ExperimentVariant',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, unique=True)),
('slug', models.SlugField(max_length=255, unique=True)),
('name', models.CharField(max_length=255)),
('slug', models.SlugField(max_length=255)),
('is_control', models.BooleanField(default=False)),
('description', models.TextField(default='')),
('threshold', models.PositiveIntegerField(default=0)),
@ -48,8 +48,12 @@ class Migration(migrations.Migration):
('experiment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='experiments.Experiment')),
],
options={
'verbose_name_plural': 'Experiment Variants',
'verbose_name': 'Experiment Variant',
'verbose_name_plural': 'Experiment Variants',
},
),
migrations.AlterUniqueTogether(
name='experimentvariant',
unique_together=set([('slug', 'experiment')]),
),
]

Просмотреть файл

@ -25,9 +25,9 @@ class Experiment(models.Model):
class ExperimentVariant(models.Model):
experiment = models.ForeignKey(Experiment, blank=False, null=False)
name = models.CharField(
max_length=255, unique=True, blank=False, null=False)
max_length=255, blank=False, null=False)
slug = models.SlugField(
max_length=255, unique=True, blank=False, null=False)
max_length=255, blank=False, null=False)
is_control = models.BooleanField(default=False)
description = models.TextField(default='')
threshold = models.PositiveIntegerField(default=0)
@ -39,3 +39,4 @@ class ExperimentVariant(models.Model):
class Meta:
verbose_name = 'Experiment Variant'
verbose_name_plural = 'Experiment Variants'
unique_together = ('slug', 'experiment')