Todd Dembrey
9e0fc8e6fd
Make the static segments work with match_any and fix bug in visit count
2017-10-24 10:50:05 +01:00
Todd Dembrey
a116b14d57
Update to use the save method on the form to populate the segments
2017-10-23 15:46:34 +01:00
Todd Dembrey
44cc95617e
Use a form to clean the instance
2017-10-23 15:00:31 +01:00
Todd Dembrey
c6ff2801c5
Update to use a post_init signal to populate the segment
2017-10-20 17:33:47 +01:00
Todd Dembrey
cf41be4b76
Add clean method to ensure mixed static segments are valid
2017-10-20 10:57:19 +01:00
Todd Dembrey
f339879907
Ensure that mixed static and dynamic segments are not populated at runtime
2017-10-20 09:53:18 +01:00
Todd Dembrey
8c96fffd4e
Ensure that the session is checked correctly
2017-10-17 17:35:57 +01:00
Todd Dembrey
675d219f1f
Add the logic for static segments
2017-10-17 16:57:07 +01:00
Michael van Tellingen
281086a159
Rename variations to variants
2017-06-02 15:31:46 +02:00
Michael van Tellingen
537dfb12a6
Fix test
2017-06-02 15:16:59 +02:00
Michael van Tellingen
6f96f2f172
Add more tests for wagtail_hooks
2017-06-02 11:23:39 +02:00
Michael van Tellingen
559d3c5356
Add unittest for serving a regular page
...
See #150
2017-06-02 10:32:41 +02:00
Michael van Tellingen
5aa754dd80
Rename PersonalisablePageMixin.personalisable_metadata
...
Use PersonalisablePageMixin.personalisation_metadata instead to mirror
the package name
2017-06-02 10:23:46 +02:00
Michael van Tellingen
282baa4787
Add tests for the wagtail_hooks.serve_variaton
2017-06-02 10:19:32 +02:00
Michael van Tellingen
35c22cb6af
Use correct filenames for the tests (and split some)
2017-06-02 10:11:46 +02:00
Michael van Tellingen
6c5ab9c6ae
Merge HomePage/SpecialPage to ContentPage in the tests
...
No need to create separate models with the same functionality
2017-06-02 09:30:04 +02:00
Michael van Tellingen
7076973fc8
Refactor personalisable pages
...
Instead of working with django model mixins it now uses a separate
model entity to keep track of the personalized pages (metadata).
The current downside of this approach is that the segment of an existing
variant is no longer easily adjustable for now.
2017-05-31 21:31:40 +02:00
Paul J Stevens
d4421eebcb
minor cleanup
2017-05-31 17:58:25 +02:00
Bertrand Bordage
38a18f80a4
Merge pull request #146 from LabD/simplifications+optimisations
...
Handles both Python 2 & 3, and multiple optimisations & simplifications.
2017-05-31 17:50:56 +02:00
Bertrand Bordage
85613db363
Merge branch 'simplifications+optimisations' of github.com:LabD/wagtail-personalisation into simplifications+optimisations
2017-05-31 17:43:18 +02:00
Bertrand Bordage
f88722c827
Further simplifications.
2017-05-31 17:38:51 +02:00
Michael van Tellingen
e6fac5f7fb
Fix templatetag tests
2017-05-31 17:19:24 +02:00
blurrah
82f2dd460e
adds tests for templatetag
2017-05-31 17:19:24 +02:00
Paul J Stevens
99d2e4a347
support multiple uses of the mixin class ( #140 )
2017-05-31 16:50:56 +02:00
Michael van Tellingen
63d5de9803
Optimize query for the segment visits
2017-05-31 16:37:10 +02:00
Michael van Tellingen
5eefa21699
Add test for sessionadapter.refresh when segment is disable
2017-05-31 16:19:09 +02:00
Michael van Tellingen
03073eb004
Add unittests for the session adapter
2017-05-31 16:13:30 +02:00
Paul J Stevens
ebef7f8785
refactor and add tests
2017-05-31 15:59:09 +02:00
Paul J Stevens
623af1a06a
start using correct model in tests
2017-05-31 15:59:09 +02:00
Michael van Tellingen
7436384471
Move visit count logic to the segment adapter
...
This makes the code also a bit simpler and updates the tests
2017-05-31 13:57:19 +02:00
Michael van Tellingen
3eac2cd4dd
Codestyle fixes (flake8)
...
This also adds the flake8 dependencies to the test extras for
installation.
2017-05-28 09:13:08 +02:00
Jasper Berghoef
ebde527ae9
Renames the module from ‘personalisation’ to ‘wagtail_personalisation’
2017-05-26 16:31:54 +02:00
Jasper Berghoef
5f1c52c93c
Fixes persistent rule persisting
2017-05-24 21:21:24 +02:00
Michael van Tellingen
02e18491bb
Fix test dependencies and skip one test for now
2017-05-24 17:05:34 +02:00
blurrah
ec7b00c318
adds a few docblocks and isorts
2017-05-03 15:04:52 +02:00
Jasper Berghoef
6640bf8d74
Splits test factories and updates documentation
2017-04-25 16:15:33 +02:00
Jasper Berghoef
d468c68970
Changes reference to rule models in adapter and tests
2017-04-19 11:40:21 +02:00
Michael van Tellingen
8e754fef07
Use wagtail-factories for testing
2017-02-18 22:46:51 +01:00
Jasper Berghoef
597c0a50f0
Device detection and accompanying rule
...
Signed-off-by: Jasper Berghoef <jasper.berghoef@gmail.com >
2017-01-11 15:28:40 +01:00
Jasper Berghoef
a7b477d71f
Day rule and accompanying tests
...
Signed-off-by: Jasper Berghoef <jasper.berghoef@gmail.com >
2017-01-10 15:36:25 +01:00
Boris Besemer
b7ca6541f4
fixes match any testing
2017-01-10 12:52:10 +01:00
Boris Besemer
cf946f2bee
removes related prefetch
2017-01-10 12:37:36 +01:00
Boris Besemer
5f8c768894
adds match_any option to segments
2016-12-22 14:25:00 +01:00
Boris Besemer
0087a8e2a5
adds test for page impersonation
2016-12-07 15:46:00 +01:00
Boris Besemer
48f1f0a61d
adds python 2.7 compatibility
2016-12-07 15:28:49 +01:00
Boris Besemer
ce619b4117
adds middleware functionality with tests
2016-12-07 11:40:58 +01:00
Boris Besemer
68b05d27ea
isort and cleaning up
2016-12-06 14:37:53 +01:00
Boris Besemer
29b9ad695b
moves all middleware logic to wagtail hook
2016-12-06 12:17:50 +01:00
Boris Besemer
3ca81d8535
changes values and adds tests
2016-12-06 11:06:02 +01:00
Boris Besemer
a5f72aa349
adds checking for admin urls 👌
2016-12-05 15:29:16 +01:00