-
Notifications
You must be signed in to change notification settings - Fork 168
Expand file tree
/
Copy pathmaple.py
More file actions
34 lines (31 loc) · 1.13 KB
/
Copy pathmaple.py
File metadata and controls
34 lines (31 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ********************************************************************************
# Copyright © 2018 jianglin
# File Name: maple.py
# Author: jianglin
# Email: mail@honmaple.com
# Created: 2018-02-11 14:56:08 (CST)
# Last Update: Monday 2022-12-12 16:38:21 (CST)
# By:
# Description:
# ********************************************************************************
from flask_maple.bootstrap import Bootstrap
from flask_maple.captcha import Captcha
from flask_maple.error import Error
from flask_maple.app import App
from flask_maple.json import CustomJSONEncoder
from flask_maple.middleware import Middleware
from flask_maple.log import Logging
from PIL import ImageFont
bootstrap = Bootstrap(css=('styles/monokai.css', 'styles/mine.css'),
js=('styles/upload.js', 'styles/forums.js',
'styles/following.js', 'styles/topic.js'),
use_auth=True)
def init_app(app):
bootstrap.init_app(app)
Captcha(app, font=ImageFont.load_default())
Error(app)
App(app, json=CustomJSONEncoder)
Middleware(app)
Logging(app)