source: rattail-demo/rattail_demo/web/views/email.py @ 5ebe3a0

Last change on this file since 5ebe3a0 was 5ebe3a0, checked in by Lance Edgar <ledgar@…>, 11 months ago

Update simple menus per newer conventions

  • Property mode set to 100644
File size: 690 bytes
Line 
1# -*- coding: utf-8; -*-
2"""
3Email views
4"""
5
6from __future__ import unicode_literals, absolute_import
7
8from tailbone.views import email as base
9
10
11class ProfilesView(base.ProfilesView):
12    """
13    Prevent edit/delete for 'feedback' email config
14    """
15
16    protected = [
17        'user_feedback',
18        'upgrade_success',
19        'upgrade_failure',
20    ]
21
22    def editable_instance(self, profile):
23        return profile['key'] not in self.protected
24
25    def deletable_instance(self, profile):
26        return profile['key'] not in self.protected
27
28
29def includeme(config):
30    ProfilesView.defaults(config)
31    base.EmailPreview.defaults(config)
32    base.EmailAttemptView.defaults(config)
Note: See TracBrowser for help on using the repository browser.