rattail-demo/rattail_demo/web/views/email.py
Lance Edgar d812e5465a Add overrides for email profiles, settings views
to make feedback email config readonly
2016-12-10 14:55:36 -06:00

26 lines
536 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
"""
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)