-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathmodels.py
More file actions
32 lines (24 loc) · 1.07 KB
/
Copy pathmodels.py
File metadata and controls
32 lines (24 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from django.db import models
class Experiment(models.Model):
"""
"""
# @@@ unique=True ??? Does that make sense???
name = models.CharField(max_length=255, unique=True)
template_name = models.CharField(max_length=255, unique=True,
help_text="Example: 'registration/signup.html'. The template to replaced.")
goal = models.CharField(max_length=255, unique=True,
help_text="Example: '/signup/complete/'. The path where the goal is converted.")
def __unicode__(self):
return self.name
class Test(models.Model):
"""
"""
experiment = models.ForeignKey(Experiment)
template_name = models.CharField(max_length=255,
help_text="Example: 'registration/signup_1.html'. The template to be tested.")
hits = models.IntegerField(blank=True, default=0,
help_text="# uniques that have seen this test.")
conversions = models.IntegerField(blank=True, default=0,
help_text="# uniques that have reached the goal from this test.")
def __unicode__(self):
return self.template_name