rattail-demo/rattail_demo/web/views/email.py

26 lines
536 B
Python
Raw Normal View History

# -*- 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
"""
def editable_instance(self, profile):
return profile['key'] != 'user_feedback'
def deletable_instance(self, profile):
return profile['key'] != 'user_feedback'
def includeme(config):
ProfilesView.defaults(config)
base.EmailPreview.defaults(config)