7

Import sorting and other code cleaning

This commit is contained in:
Jasper Berghoef
2016-11-09 14:10:52 +01:00
parent 7e8e395448
commit b6c35e214a
5 changed files with 30 additions and 22 deletions

View File

@ -4,18 +4,22 @@ from personalisation import models
class TimeRuleAdminInline(admin.TabularInline):
"""Inline the Time Rule into the administration interface for segments"""
model = models.TimeRule
extra = 0
class ReferralRuleAdminInline(admin.TabularInline):
"""Inline the Referral Rule into the administration interface for segments"""
model = models.ReferralRule
extra = 0
class VisitCountRuleAdminInline(admin.TabularInline):
"""Inline the Visit Count Rule into the administration interface for segments"""
model = models.VisitCountRule
extra = 0
class SegmentAdmin(admin.ModelAdmin):
"""Add the inlines to the Segment admin interface"""
inlines = (TimeRuleAdminInline, ReferralRuleAdminInline, VisitCountRuleAdminInline)