Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add wagtail AB testing package #298

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 134 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ scout-apm = "^3.1.0"
sentry-sdk = "^2.5.1"
html5lib = "^1.1"
beautifulsoup4 = "^4.12.3"
wagtail-ab-testing = "^0.10"

[tool.poetry.extras]
gunicorn = ["gunicorn"]
Expand Down
3 changes: 2 additions & 1 deletion tbx/project_styleguide/templates/patterns/base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load static wagtailuserbar wagtailcore_tags wagtailimages_tags navigation_tags util_tags wagtailaccessibility_tags %}
{% load static wagtailuserbar wagtailcore_tags wagtailimages_tags navigation_tags util_tags wagtailaccessibility_tags wagtail_ab_testing_tags %}
<!doctype html>
<html
class="
Expand Down Expand Up @@ -53,6 +53,7 @@
{% block footer %}{% endblock %}

<script src="{% static 'js/main.js' %}"></script>
{% wagtail_ab_testing_script %}

{% tota11y %}

Expand Down
1 change: 1 addition & 0 deletions tbx/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"birdbath",
"wagtailmedia",
"wagtail.contrib.typed_table_block",
"wagtail_ab_testing",
]

MIDDLEWARE = [
Expand Down
2 changes: 2 additions & 0 deletions tbx/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from wagtail.documents import urls as wagtaildocs_urls
from wagtail.models import Page
from wagtail.utils.urlpatterns import decorate_urlpatterns
from wagtail_ab_testing import urls as ab_testing_urls

private_urlpatterns = [
path("django-admin/", admin.site.urls),
Expand All @@ -26,6 +27,7 @@
urlpatterns = [
path("sitemap.xml", sitemap),
path("robots.txt", robots),
path("abtesting/", include(ab_testing_urls)),
]


Expand Down