♑🛠️
- add show price preference(store in cookies)
This commit is contained in:
@@ -14,6 +14,16 @@ _loader = jinja2.FileSystemLoader("templates")
|
||||
_env = jinja2.Environment(loader=_loader, autoescape=jinja2.select_autoescape(), cache_size=0)
|
||||
templates = Jinja2Templates(env=_env)
|
||||
|
||||
# Custom Jinja2 filter: {{ prop.price|price_fmt(price_pref, prop.area_sqft) }}
|
||||
from price_pref import format_price as _format_price
|
||||
|
||||
|
||||
def _price_fmt(value, price_pref="total", area_sqft=0):
|
||||
return _format_price(value, price_pref, area_sqft)
|
||||
|
||||
|
||||
_env.filters["price_fmt"] = _price_fmt
|
||||
|
||||
bcrypt_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
||||
|
||||
oauth2_bearer = OAuth2PasswordBearer(tokenUrl="auth/token", auto_error=False)
|
||||
|
||||
Reference in New Issue
Block a user