33 lines
690 B
Python
33 lines
690 B
Python
# -*- coding: utf-8; -*-
|
|
"""
|
|
Email views
|
|
"""
|
|
|
|
from __future__ import unicode_literals, absolute_import
|
|
|
|
from tailbone.views import email as base
|
|
|
|
|
|
class ProfilesView(base.ProfilesView):
|
|
"""
|
|
Prevent edit/delete for 'feedback' email config
|
|
"""
|
|
|
|
protected = [
|
|
'user_feedback',
|
|
'upgrade_success',
|
|
'upgrade_failure',
|
|
]
|
|
|
|
def editable_instance(self, profile):
|
|
return profile['key'] not in self.protected
|
|
|
|
def deletable_instance(self, profile):
|
|
return profile['key'] not in self.protected
|
|
|
|
|
|
def includeme(config):
|
|
ProfilesView.defaults(config)
|
|
base.EmailPreview.defaults(config)
|
|
base.EmailAttemptView.defaults(config)
|