aboutsummaryrefslogtreecommitdiffstats
path: root/siteconfig.py
blob: 28c3cbd0b05d3c3ec06e36c1a9e38a285631b859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class siteconfig:
    # REQUIRED SETTINGS#
    DOMAIN = "example.net"          # Your domain name, or site title
    HOME_TITLE = "WELCOME"          # "HELLO WORLD!"
    LINKS_FILE = ".links"           # ".lnx"
    DESC_FILE = ".description"      # ".desc`"
    HOST = "127.0.0.1"              # "192.168.1.1" "1.2.3.4"
    PORT = 8000                     # 8080, 8001, 8002
    DEFAULT_MIMETYPE = "application/octet-stream"   # "text/plain"

    MIMETYPES = {}
    with open('mimetypes.csv') as f:
        for line in f.readlines():
            ext, mime = line.strip().split(',')
            MIMETYPES.update({ext: mime})

    # OPTIONAL SETTINGS #
    # Remove 'None' to add custom values
    MAIN_SITE_DIRS = None  # ["dir1", "dir2", "dir3"]
    # b"\xca\x05\x80\xa3|\xdbh@\xec<\xcd\x19\xf4\nRN:)\x13\x917|km\xb0'>'\x1d&G\xe8"
    SECRET_KEY = None