Add email config views
This commit is contained in:
parent
c61f5c8053
commit
365d5847a4
20
rattail_demo/config.py
Normal file
20
rattail_demo/config.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Rattail Demo config extension
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
from rattail.config import ConfigExtension
|
||||
|
||||
|
||||
class DemoConfigExtension(ConfigExtension):
|
||||
"""
|
||||
Rattail Demo config extension
|
||||
"""
|
||||
key = 'rattail-demo'
|
||||
|
||||
def configure(self, config):
|
||||
|
||||
# tell rattail where our stuff lives
|
||||
config.setdefault('rattail.mail', 'emails', 'rattail_demo.emails')
|
9
rattail_demo/emails.py
Normal file
9
rattail_demo/emails.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Email definitions
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
# just tempmon emails for now
|
||||
from rattail_tempmon.emails import tempmon_low_temp, tempmon_high_temp, tempmon_critical_temp, tempmon_error
|
|
@ -90,7 +90,7 @@
|
|||
</li>
|
||||
% endif
|
||||
|
||||
% if request.has_any_perm('users.list', 'roles.list', 'settings.list'):
|
||||
% if request.has_any_perm('users.list', 'roles.list', 'emailprofiles.list', 'settings.list'):
|
||||
<li>
|
||||
<a>Admin</a>
|
||||
<ul>
|
||||
|
@ -100,6 +100,9 @@
|
|||
% if request.has_perm('roles.list'):
|
||||
<li>${h.link_to("Roles", url('roles'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('emailprofiles.list'):
|
||||
<li>${h.link_to("Email Profiles", url('emailprofiles'))}</li>
|
||||
% endif
|
||||
% if request.has_perm('settings.list'):
|
||||
<li>${h.link_to("Settings", url('settings'))}</li>
|
||||
% endif
|
||||
|
|
|
@ -33,6 +33,7 @@ def includeme(config):
|
|||
config.include('tailbone.views.brands')
|
||||
config.include('tailbone.views.customers')
|
||||
config.include('tailbone.views.departments')
|
||||
config.include('tailbone.views.email')
|
||||
config.include('tailbone.views.employees')
|
||||
config.include('tailbone.views.families')
|
||||
config.include('rattail_demo.web.views.people')
|
||||
|
|
Loading…
Reference in a new issue