ABToast is an A/B Testing app that is developed in django.
Project description
# ABToast
ABToast is a simple A/B Testing app that is developed in django. This app implements the Django Session functionality to achieve the goal.
### Installation
ABToast requires [Django](https://www.djangoproject.com/download/) to run.
Install ABToast from pip
```sh
$ pip install django-abtoast
```
OR, Get ABToast locally
```sh
$ git clone https://github.com/htadg/ABToast.git ABToast
```
Add ABToast to INSTALLED_APPS
```python
INSTALLED_APPS = (
# Django Default Apps
'django.contrib.admin',
'...',
# ABToast
'ABToast',
)
```
Add ABToast.middleware.ABMiddleware to the project middlewares
```python
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'...',
# Custom Middleware
'ABToast.middleware.ABMiddleware',
)
```
Migrate the database and create admin account
```sh
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py createsuperuser
```
Now Create your own new Tests in the Database
```
Note: You can also create New Experiment and Tests from the Django Admin Panel
```
```python
from datetime import date
from dateutil.relativedelta import relativedelta
from ABToast.models import Experiment, Test
# Starting the Experiment from today
start_date = date.today()
# End Date for the Experiment
# Experiment runs for two months
end_date = start_date + relativedelta(months=+2)
# Create an Experiment
exp = Experiment.objects.create(name="Homepage Test", template_name="registraions/signup.html", goal="registrations/success", start=start_date, end=end_date, is_active=True)
# Create two variations of the homepage.
# One Test for the original template
Test.objects.create(template_name="registraions/signup.html", experiment=exp)
# Other Test for the New Variant
Test.objects.create(template_name="registraions/new_signup.html", experiment=exp)
```
Now You can run A/B Test on a view
```python
def home(request, template_name="registrations/signup.html"):
try:
template_name = request.ab.run(template_name)
except TemplateDoesNotExist:
pass
return render_to_response(template_name)
```
### Development
Want to contribute? Great!
Do the necessary changes that you feel and send a pull request.
### Todos
- [ ] Multivariate Testing
- [ ] Add Graphical Information
- [ ] Add Bayesian Formula for the Conversion Rates
License
----
MIT
**Free Software, Hell Yeah!**
ABToast is a simple A/B Testing app that is developed in django. This app implements the Django Session functionality to achieve the goal.
### Installation
ABToast requires [Django](https://www.djangoproject.com/download/) to run.
Install ABToast from pip
```sh
$ pip install django-abtoast
```
OR, Get ABToast locally
```sh
$ git clone https://github.com/htadg/ABToast.git ABToast
```
Add ABToast to INSTALLED_APPS
```python
INSTALLED_APPS = (
# Django Default Apps
'django.contrib.admin',
'...',
# ABToast
'ABToast',
)
```
Add ABToast.middleware.ABMiddleware to the project middlewares
```python
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'...',
# Custom Middleware
'ABToast.middleware.ABMiddleware',
)
```
Migrate the database and create admin account
```sh
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py createsuperuser
```
Now Create your own new Tests in the Database
```
Note: You can also create New Experiment and Tests from the Django Admin Panel
```
```python
from datetime import date
from dateutil.relativedelta import relativedelta
from ABToast.models import Experiment, Test
# Starting the Experiment from today
start_date = date.today()
# End Date for the Experiment
# Experiment runs for two months
end_date = start_date + relativedelta(months=+2)
# Create an Experiment
exp = Experiment.objects.create(name="Homepage Test", template_name="registraions/signup.html", goal="registrations/success", start=start_date, end=end_date, is_active=True)
# Create two variations of the homepage.
# One Test for the original template
Test.objects.create(template_name="registraions/signup.html", experiment=exp)
# Other Test for the New Variant
Test.objects.create(template_name="registraions/new_signup.html", experiment=exp)
```
Now You can run A/B Test on a view
```python
def home(request, template_name="registrations/signup.html"):
try:
template_name = request.ab.run(template_name)
except TemplateDoesNotExist:
pass
return render_to_response(template_name)
```
### Development
Want to contribute? Great!
Do the necessary changes that you feel and send a pull request.
### Todos
- [ ] Multivariate Testing
- [ ] Add Graphical Information
- [ ] Add Bayesian Formula for the Conversion Rates
License
----
MIT
**Free Software, Hell Yeah!**
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-abtoast-1.0.3.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file django-abtoast-1.0.3.tar.gz
.
File metadata
- Download URL: django-abtoast-1.0.3.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d43a025fb50a9b357fcf05999fda70f3774d4ee1bf311b1d7061d8e9a2f7aa8f |
|
MD5 | 4ebb9cee6f0d585f4433216db061d506 |
|
BLAKE2b-256 | 192818fd7ab2fb06b2337354550c613c6432b4e2ad2b3d673b9bd88e3897f71e |
File details
Details for the file django_abtoast-1.0.3-py2-none-any.whl
.
File metadata
- Download URL: django_abtoast-1.0.3-py2-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 872975bdbe2ed8fe4dfed3a90b07f7534e323c5dc71945263a35c035afaf0bef |
|
MD5 | 6d18b4021488c521a9c5b144a88d4e5f |
|
BLAKE2b-256 | 38215d41347cb007217f3eda19c80a844fe3a3c1726ccea2bc168e76a1de0955 |