Closes #29: Add analysis field and associated database migration.

This commit is contained in:
Marina Samuel 2017-04-27 17:07:04 -04:00
Родитель 1e9db9b4b1
Коммит 70466d1450
3 изменённых файлов: 22 добавлений и 0 удалений

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

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-27 21:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('experiments', '0002_experiment_experimentvariant'),
]
operations = [
migrations.AddField(
model_name='experiment',
name='analysis',
field=models.TextField(default=''),
),
]

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

@ -11,6 +11,7 @@ class Experiment(models.Model):
max_length=255, unique=True, blank=False, null=False)
objectives = models.TextField(default='')
success_criteria = models.TextField(default='')
analysis = models.TextField(default='')
start_date = models.DateTimeField(blank=True, null=True)
end_date = models.DateTimeField(blank=True, null=True)

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

@ -17,6 +17,7 @@ class ExperimentFactory(factory.django.DjangoModelFactory):
slug = factory.LazyAttribute(lambda o: slugify(o.name))
objectives = factory.LazyAttribute(lambda o: faker.paragraphs())
success_criteria = factory.LazyAttribute(lambda o: faker.paragraphs())
analysis = factory.LazyAttribute(lambda o: faker.paragraphs())
start_date = factory.LazyAttribute(lambda o: datetime.datetime.now())
end_date = factory.LazyAttribute(
lambda o: o.start_date + datetime.timedelta(weeks=2))