7

Compare commits

...

12 Commits

Author SHA1 Message Date
414afa5269 Merge branch 'release/0.10.3' 2018-01-05 19:17:18 +02:00
b3f0ac2d58 Version Bump 0.10.3 2018-01-05 19:16:45 +02:00
4f9c18d2cf Merge pull request #3 from praekeltfoundation/fix-segment-edit-link
Fix segment edit link
2018-01-05 17:08:12 +00:00
a4a283e4f3 Fix segment edit link
This is hardcoded at the moment which doesn't work unless you
redirect URLs to have a trailing slash.

Using the reverse URL lookup works in all cases.
2018-01-05 17:00:15 +00:00
30318549e2 Merge pull request #4 from praekeltfoundation/feature/issue-4-update-wagtail-django-dependencies
Update wagtail and django dependencies
2018-01-05 18:55:18 +02:00
f19de241b0 Update dependencies for wagtail and django
Only run tests for wagtail v1.13 and django v1.11
2018-01-05 18:28:40 +02:00
95ecd8d200 Merge branch 'release/0.10.2' into develop 2017-11-23 16:33:16 +02:00
6436b85b1d Merge branch 'release/0.10.2' 2017-11-23 16:32:31 +02:00
06471248d3 Version Bump 0.10.2 2017-11-23 16:32:20 +02:00
e3df03f559 Merge pull request #2 from torchbox/fix/visitor-rule-not-updating
Fix visitor rule not updating correct paths
2017-11-23 16:29:13 +02:00
0a42ce3eeb Fix not updating visitor count rule properly 2017-11-23 14:10:16 +00:00
e5068894c3 Merge branch 'release/0.10.1' into develop 2017-11-13 15:03:41 +02:00
7 changed files with 13 additions and 14 deletions

View File

@ -4,9 +4,8 @@ language: python
matrix: matrix:
include: include:
# Django 1.9, Wagtail 1.9
- python: 2.7 - python: 2.7
env: TOXENV=py27-django19-wagtail19 env: TOXENV=py27-django111-wagtail113
install: install:
- pip install tox codecov - pip install tox codecov

View File

@ -55,10 +55,10 @@ author = 'Lab Digital BV'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.10.1' version = '0.10.3'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.10.1' release = '0.10.3'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View File

@ -1,5 +1,5 @@
[bumpversion] [bumpversion]
current_version = 0.10.1 current_version = 0.10.3
commit = true commit = true
tag = true tag = true
tag_name = {new_version} tag_name = {new_version}

View File

@ -2,7 +2,7 @@ import re
from setuptools import find_packages, setup from setuptools import find_packages, setup
install_requires = [ install_requires = [
'wagtail>=1.9,<1.11', 'wagtail>=1.10,<1.14',
'user-agents>=1.0.1', 'user-agents>=1.0.1',
'wagtailfontawesome>=1.0.6', 'wagtailfontawesome>=1.0.6',
] ]
@ -32,7 +32,7 @@ with open('README.rst') as fh:
setup( setup(
name='wagtail-personalisation-molo', name='wagtail-personalisation-molo',
version='0.10.1', version='0.10.3',
description='A forked version of Wagtail add-on for showing personalized content', description='A forked version of Wagtail add-on for showing personalized content',
author='Praekelt.org', author='Praekelt.org',
author_email='dev@praekeltfoundation.org', author_email='dev@praekeltfoundation.org',

View File

@ -133,12 +133,13 @@ class SessionSegmentsAdapter(BaseSegmentsAdapter):
if page_visits: if page_visits:
for page_visit in page_visits: for page_visit in page_visits:
page_visit['count'] += 1 page_visit['count'] += 1
page_visit['path'] = page.url_path if page else self.request.path
self.request.session.modified = True self.request.session.modified = True
else: else:
visit_count.append({ visit_count.append({
'slug': page.slug, 'slug': page.slug,
'id': page.pk, 'id': page.pk,
'path': self.request.path, 'path': page.url_path if page else self.request.path,
'count': 1, 'count': 1,
}) })

View File

@ -22,7 +22,7 @@
<div class="nice-padding block_container"> <div class="nice-padding block_container">
{% if all_count %} {% if all_count %}
{% for segment in object_list %} {% for segment in object_list %}
<div class="block block--{{ segment.status }}" onclick="location.href = 'edit/{{ segment.pk }}'"> <div class="block block--{{ segment.status }}" onclick="location.href = '{% url 'wagtail_personalisation_segment_modeladmin_edit' segment.pk %}'">
<h2>{{ segment }}</h2> <h2>{{ segment }}</h2>
<div class="inspect_container"> <div class="inspect_container">
<ul class="inspect segment_stats"> <ul class="inspect segment_stats">
@ -90,7 +90,7 @@
{% elif segment.status == segment.STATUS_ENABLED %} {% elif segment.status == segment.STATUS_ENABLED %}
<li><a href="{% url 'segment:toggle' segment.pk %}" title="{% trans "Disable this segment" %}">disable</a></li> <li><a href="{% url 'segment:toggle' segment.pk %}" title="{% trans "Disable this segment" %}">disable</a></li>
{% endif %} {% endif %}
<li><a href="edit/{{ segment.pk }}" title="{% trans "Configure this segment" %}">configure this</a></li> <li><a href="{% url 'wagtail_personalisation_segment_modeladmin_edit' segment.pk %}" title="{% trans "Configure this segment" %}">configure this</a></li>
</ul> </ul>
{% endif %} {% endif %}
</div> </div>

View File

@ -1,13 +1,12 @@
[tox] [tox]
envlist = py{27}-django{19}-wagtail{19},lint envlist = py{27}-django{111}-wagtail{113},lint
[testenv] [testenv]
commands = coverage run --parallel -m pytest {posargs} commands = coverage run --parallel -m pytest {posargs}
extras = test extras = test
deps = deps =
django19: django>=1.9,<1.10 django111: django>=1.11,<1.12
wagtail19: wagtail>=1.9,<1.10 wagtail19: wagtail>=1.13,<1.14
wagtail110: wagtail>=1.10,<1.11
[testenv:coverage-report] [testenv:coverage-report]
basepython = python2.7 basepython = python2.7