finish that a tag in topics view
This commit is contained in:
@ -3,6 +3,7 @@ from dotenv import load_dotenv
|
||||
from .models import Avatars, Users
|
||||
from .auth import digest
|
||||
from .routes.users import is_logged_in, get_active_user
|
||||
from .routes.threads import get_post_url
|
||||
from .constants import (
|
||||
PermissionLevel, permission_level_string,
|
||||
InfoboxKind, InfoboxIcons, InfoboxHTMLClass,
|
||||
@ -116,6 +117,12 @@ def create_app():
|
||||
def inject_auth():
|
||||
return {"is_logged_in": is_logged_in, "get_active_user": get_active_user, "active_user": get_active_user()}
|
||||
|
||||
@app.context_processor
|
||||
def inject_funcs():
|
||||
return {
|
||||
'get_post_url': get_post_url,
|
||||
}
|
||||
|
||||
@app.template_filter("ts_datetime")
|
||||
def ts_datetime(ts, format):
|
||||
return datetime.utcfromtimestamp(ts or int(time.time())).strftime(format)
|
||||
|
Reference in New Issue
Block a user