generate token by program
This commit is contained in:
parent
441f2cb6c8
commit
882d689609
2 changed files with 2 additions and 2 deletions
|
@ -3,13 +3,11 @@
|
||||||
[main]
|
[main]
|
||||||
lang = fr
|
lang = fr
|
||||||
db_sqlite_file = db.sqlite
|
db_sqlite_file = db.sqlite
|
||||||
db_backup_json_file = db.json
|
|
||||||
newcomment_polling = 60
|
newcomment_polling = 60
|
||||||
|
|
||||||
[site]
|
[site]
|
||||||
name = "My blog"
|
name = "My blog"
|
||||||
url = http://blog.mydomain.com
|
url = http://blog.mydomain.com
|
||||||
token =
|
|
||||||
admin_email = admin@mydomain.com
|
admin_email = admin@mydomain.com
|
||||||
|
|
||||||
[http]
|
[http]
|
||||||
|
|
2
run.py
2
run.py
|
@ -5,6 +5,7 @@ import sys
|
||||||
import os
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
|
import hashlib
|
||||||
|
|
||||||
from stacosys.conf.config import Config, ConfigParameter
|
from stacosys.conf.config import Config, ConfigParameter
|
||||||
from stacosys.db import database
|
from stacosys.db import database
|
||||||
|
@ -91,6 +92,7 @@ def stacosys_server(config_pathname):
|
||||||
app.logger.addHandler(mail_handler)
|
app.logger.addHandler(mail_handler)
|
||||||
|
|
||||||
# configure scheduler
|
# configure scheduler
|
||||||
|
conf.set(ConfigParameter.SITE_TOKEN, hashlib.sha1(conf.get(ConfigParameter.SITE_NAME)).hexdigest())
|
||||||
scheduler.configure(
|
scheduler.configure(
|
||||||
conf.get_int(ConfigParameter.IMAP_POLLING),
|
conf.get_int(ConfigParameter.IMAP_POLLING),
|
||||||
conf.get_int(ConfigParameter.COMMENT_POLLING),
|
conf.get_int(ConfigParameter.COMMENT_POLLING),
|
||||||
|
|
Loading…
Add table
Reference in a new issue