new home image

This commit is contained in:
2021-12-10 14:42:59 +01:00
parent 4ac11291a7
commit e467611821
5 changed files with 8 additions and 22 deletions

View File

@@ -1,21 +1,11 @@
# -*- coding: utf8 -*-
from pyramid.response import Response
from pyramid.renderers import render, get_renderer
from pyramid.view import (
view_config,
forbidden_view_config,
)
from pyramid.httpexceptions import (
HTTPFound,
HTTPNotFound,
HTTPForbidden,
)
from pyramid_mailer import get_mailer
from pyramid_mailer.message import Message, Attachment
from sqlalchemy.exc import DBAPIError
from ..security import groupfinder
from ..models.members import (
get_member_by_email
)
@@ -23,19 +13,14 @@ from ..models.contents import (
get_docs_bytopic
)
# import datetime
import time
import hashlib
import locale
def to_decimal(x):
import decimal
return decimal.Decimal(str(x))
def to_euro(x):
"""Takes a float and returns 12 345,67 €"""
locale.setlocale(locale.LC_ALL,'')
return locale.currency(x, True, True)
"""Takes a float and returns a string"""
return (u"%.2f" % x).replace('.', ',')
def to_usd(x):
"""Takes a float and returns a string"""