Skip to main content

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
```python
from ABToast.models import Experiment, Test

# Create an Experiment
exp = Experiment.objects.create(name="Homepage Test", template_name="registraions/signup.html", goal="registrations/success")

# Create two variations of the homepage.

# One Test for the original template
Test.objects.create(template_name="index.htmregistraions/signup.html",)

# 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.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_abtoast-1.0.0-py2-none-any.whl (8.4 kB view details)

Uploaded Python 2

File details

Details for the file django-abtoast-1.0.0.tar.gz.

File metadata

File hashes

Hashes for django-abtoast-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0aca50f585031a6e0b81bf68d0580764d4f99a66b7bfe0de05ce507c0d774258
MD5 e81d39d2895dc3cc6f15114c275258a1
BLAKE2b-256 39afe4a9e1a20130ef740573fba4e4fd5960cdde6ee3b12ef11e90b7191df6b6

See more details on using hashes here.

File details

Details for the file django_abtoast-1.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for django_abtoast-1.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 3d25c7cac28156c2e67cf5e0203c76e44e42dbec7432a2f626193d8ac90f6f6e
MD5 79f40529a67016c462965980a6eded69
BLAKE2b-256 28120e37876ab55165831ac63146c34a748f4442a8e79f4f372d40f2be2f4225

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page