Import sorting and other code cleaning
This commit is contained in:
@ -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)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user