Refactored config a bit
This commit is contained in:
parent
0ab7a9cb67
commit
63cb27afb8
3 changed files with 14 additions and 13 deletions
|
|
@ -1,8 +1,5 @@
|
||||||
from __future__ import with_statement
|
|
||||||
|
|
||||||
from time import time
|
from time import time
|
||||||
from hashlib import sha1
|
from hashlib import sha1
|
||||||
from contextlib import closing
|
|
||||||
|
|
||||||
from openid.association import Association
|
from openid.association import Association
|
||||||
from openid.store.interface import OpenIDStore
|
from openid.store.interface import OpenIDStore
|
||||||
|
|
@ -10,8 +7,10 @@ from openid.consumer.consumer import Consumer, SUCCESS, CANCEL
|
||||||
from openid.consumer import discover
|
from openid.consumer import discover
|
||||||
from openid.store import nonce
|
from openid.store import nonce
|
||||||
|
|
||||||
from sqlalchemy.orm import scoped_session
|
# python-openid is a really stupid library in that regard, we have
|
||||||
from sqlalchemy.exceptions import SQLError
|
# to disable logging by monkey patching
|
||||||
|
from openid import oidutil
|
||||||
|
oidutil.log = lambda *a, **kw: None
|
||||||
|
|
||||||
from flask import request, redirect, abort, url_for, flash, session
|
from flask import request, redirect, abort, url_for, flash, session
|
||||||
from flask_website.database import User, db_session, OpenIDAssociation, \
|
from flask_website.database import User, db_session, OpenIDAssociation, \
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,8 @@ from subprocess import Popen
|
||||||
|
|
||||||
from flask import json
|
from flask import json
|
||||||
from werkzeug import Headers, parse_date
|
from werkzeug import Headers, parse_date
|
||||||
|
from websiteconfig import INCOMING_MAIL_FOLDER, THREAD_FOLDER, \
|
||||||
|
LIST_NAME, RSYNC_PATH, SUBJECT_PREFIX
|
||||||
INCOMING_MAIL_FOLDER = '_mailinglist/incoming'
|
|
||||||
THREAD_FOLDER = '_mailinglist/threads'
|
|
||||||
LIST_NAME = 'flask'
|
|
||||||
RSYNC_PATH = 'librelist.com::json/%s'
|
|
||||||
SUBJECT_PREFIX = '[flask]'
|
|
||||||
|
|
||||||
|
|
||||||
_punctuation_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.:]+')
|
_punctuation_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.:]+')
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,16 @@ import os
|
||||||
_basedir = os.path.abspath(os.path.dirname(__file__))
|
_basedir = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
||||||
SECRET_KEY = 'testkey'
|
SECRET_KEY = 'testkey'
|
||||||
DATABASE_URI = 'sqlite:///' + os.path.join(_basedir, 'flask-website.db')
|
DATABASE_URI = 'sqlite:///' + os.path.join(_basedir, 'flask-website.db')
|
||||||
MAILINGLIST_PATH = os.path.join(_basedir, '_mailinglist')
|
|
||||||
THREADS_PER_PAGE = 15
|
THREADS_PER_PAGE = 15
|
||||||
|
MAILINGLIST_PATH = os.path.join(_basedir, '_mailinglist')
|
||||||
|
INCOMING_MAIL_FOLDER = '_mailinglist/incoming'
|
||||||
|
THREAD_FOLDER = '_mailinglist/threads'
|
||||||
|
LIST_NAME = 'flask'
|
||||||
|
RSYNC_PATH = 'librelist.com::json/%s'
|
||||||
|
SUBJECT_PREFIX = '[flask]'
|
||||||
|
|
||||||
del os
|
del os
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue