Add rattail_config attribute to base View class.

Just a shortcut but should save a little code noise.
This commit is contained in:
Lance Edgar 2015-07-20 09:51:29 -05:00
parent d0a977d64b
commit 3732cc30f2

View file

@ -38,6 +38,13 @@ class View(object):
def __init__(self, request):
self.request = request
@property
def rattail_config(self):
"""
Reference to the effective Rattail config object.
"""
return self.request.rattail_config
def fake_error(request):
"""