7

Extended info in the segment overview because vision

This commit is contained in:
Jasper Berghoef
2016-11-17 13:53:06 +01:00
parent 856992f987
commit dca285c64b
7 changed files with 125 additions and 29 deletions

View File

@ -2,7 +2,7 @@ import time
from django.conf.urls import include, url
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register
from wagtail.contrib.modeladmin.views import CreateView
from wagtail.contrib.modeladmin.views import IndexView
from wagtail.wagtailcore import hooks
from personalisation import admin_urls
@ -22,6 +22,15 @@ def register_admin_urls():
]
class SegmentIndexView(IndexView):
def get_context_data(self, **kwargs):
context = {
'additional_forms': (TimeRuleForm, ReferralRuleForm, VisitCountRuleForm),
}
context.update(kwargs)
return super(SegmentIndexView, self).get_context_data(**context)
class SegmentModelAdmin(ModelAdmin):
"""The base model for the Segments administration interface."""
model = Segment