Changeset 4371574 in tailbone


Ignore:
Timestamp:
08/09/2020 02:03:28 PM (3 years ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
1631343
Parents:
7d158e5
Message:

Add model to global template context, plus h.maxlen()

sometimes it's nice to just add a maxlength="100" or whatever to an input tag
within some random template. that should "just be possible" with no extra
effort

Location:
tailbone
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tailbone/helpers.py

    r7d158e5 r4371574  
    3333from rattail.util import (pretty_quantity, pretty_hours, hours_as_decimal,
    3434                          OrderedDict)
     35from rattail.db.util import maxlen
    3536
    3637from webhelpers2.html import *
  • tailbone/subscribers.py

    r7d158e5 r4371574  
    33#
    44#  Rattail -- Retail Software Framework
    5 #  Copyright © 2010-2019 Lance Edgar
     5#  Copyright © 2010-2020 Lance Edgar
    66#
    77#  This file is part of Rattail.
     
    100100    renderer_globals['rattail'] = rattail
    101101    renderer_globals['tailbone'] = tailbone
     102    renderer_globals['model'] = request.rattail_config.get_model()
    102103    renderer_globals['enum'] = request.rattail_config.get_enum()
    103104    renderer_globals['six'] = six
Note: See TracChangeset for help on using the changeset viewer.