~sircmpwn/names.sr.ht

ref: 4befa4e5942b52045dc9ef9bcd3473389db71d61 names.sr.ht/names/app.py -rw-r--r-- 506 bytes
4befa4e5Drew DeVault Add tables for remaining TLDs with special reqs 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from names.oauth import NamesOAuthService
from srht.config import cfg
from srht.database import DbSession
from srht.flask import SrhtFlask

db = DbSession(cfg("names.sr.ht", "connection-string"))
db.init()

class NamesApp(SrhtFlask):
    def __init__(self):
        super().__init__("names.sr.ht", __name__,
                oauth_service=NamesOAuthService())

        self.url_map.strict_slashes = False

        from names.blueprints.web import web

        self.register_blueprint(web)

app = NamesApp()