Skip to content

Commit

Permalink
fix: default config not existing
Browse files Browse the repository at this point in the history
  • Loading branch information
wzyboy committed Jul 9, 2023
1 parent 87a968c commit 430ca22
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ash.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
A Flask-based web server that serves Twitter Archive.
'''

import os
import re
import pprint
import itertools
Expand All @@ -16,11 +15,22 @@
from elasticsearch import Elasticsearch


class DefaultConfig:
T_ES_HOST = 'http://localhost:9200'
T_ES_INDEX = 'tweets-*,toots-*'
T_MEDIA_FROM = 'direct'
T_EXTERNAL_TWEETS = False


app = flask.Flask(
__name__,
static_url_path='/tweet/static'
)
app.config.from_object('config.Config')
app.config.from_object(DefaultConfig)
try:
app.config.from_object('config.Config')
except ImportError:
pass


# Set up external Tweets support
Expand Down

0 comments on commit 430ca22

Please sign in to comment.