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 hashlib import sha1
|
||||
from contextlib import closing
|
||||
|
||||
from openid.association import Association
|
||||
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.store import nonce
|
||||
|
||||
from sqlalchemy.orm import scoped_session
|
||||
from sqlalchemy.exceptions import SQLError
|
||||
# python-openid is a really stupid library in that regard, we have
|
||||
# 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_website.database import User, db_session, OpenIDAssociation, \
|
||||
|
|
|
|||
|
|
@ -23,13 +23,8 @@ from subprocess import Popen
|
|||
|
||||
from flask import json
|
||||
from werkzeug import Headers, parse_date
|
||||
|
||||
|
||||
INCOMING_MAIL_FOLDER = '_mailinglist/incoming'
|
||||
THREAD_FOLDER = '_mailinglist/threads'
|
||||
LIST_NAME = 'flask'
|
||||
RSYNC_PATH = 'librelist.com::json/%s'
|
||||
SUBJECT_PREFIX = '[flask]'
|
||||
from websiteconfig import INCOMING_MAIL_FOLDER, THREAD_FOLDER, \
|
||||
LIST_NAME, RSYNC_PATH, SUBJECT_PREFIX
|
||||
|
||||
|
||||
_punctuation_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.:]+')
|
||||
|
|
|
|||
|
|
@ -3,9 +3,16 @@ import os
|
|||
_basedir = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
DEBUG = False
|
||||
|
||||
SECRET_KEY = 'testkey'
|
||||
DATABASE_URI = 'sqlite:///' + os.path.join(_basedir, 'flask-website.db')
|
||||
MAILINGLIST_PATH = os.path.join(_basedir, '_mailinglist')
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue