Add short_description field to Experiment fixes #288
This commit is contained in:
Родитель
e986d86e86
Коммит
0ec71bc13d
|
@ -79,6 +79,7 @@ class ExperimentAdmin(admin.ModelAdmin):
|
|||
'project',
|
||||
'name',
|
||||
'slug',
|
||||
'short_description',
|
||||
),
|
||||
}),
|
||||
('Client Config', {
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11 on 2018-02-13 16:38
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('experiments', '0004_auto_20171205_2015'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='experiment',
|
||||
name='short_description',
|
||||
field=models.TextField(blank=True, default='', null=True),
|
||||
),
|
||||
]
|
|
@ -102,6 +102,7 @@ class Experiment(models.Model):
|
|||
max_length=255, unique=True, blank=False, null=False)
|
||||
slug = models.SlugField(
|
||||
max_length=255, unique=True, blank=False, null=False)
|
||||
short_description = models.TextField(default='', blank=True, null=True)
|
||||
pref_key = models.CharField(max_length=255, blank=True, null=True)
|
||||
pref_type = models.CharField(
|
||||
max_length=255,
|
||||
|
|
|
@ -19,6 +19,8 @@ class ExperimentFactory(factory.django.DjangoModelFactory):
|
|||
project = factory.SubFactory(ProjectFactory)
|
||||
name = factory.LazyAttribute(lambda o: faker.catch_phrase())
|
||||
slug = factory.LazyAttribute(lambda o: slugify(o.name))
|
||||
short_description = factory.LazyAttribute(
|
||||
lambda o: faker.text(random.randint(100, 500)))
|
||||
pref_key = factory.LazyAttribute(
|
||||
lambda o: 'browser.{pref}.enabled'.format(
|
||||
pref=faker.catch_phrase().replace(' ', '.').lower()))
|
||||
|
|
Загрузка…
Ссылка в новой задаче