More stuff moved

This commit is contained in:
Thomas Sileo 2019-08-01 22:00:26 +02:00
parent cd2ae3d7b0
commit d4590996e0
14 changed files with 59 additions and 58 deletions

32
app.py
View file

@ -30,24 +30,13 @@ from little_boxes.webfinger import get_actor_url
from little_boxes.webfinger import get_remote_follow_template from little_boxes.webfinger import get_remote_follow_template
from u2flib_server import u2f from u2flib_server import u2f
import activitypub
import blueprints.admin import blueprints.admin
import blueprints.indieauth import blueprints.indieauth
import blueprints.tasks import blueprints.tasks
import blueprints.well_known import blueprints.well_known
import config import config
from activitypub import Box from core.meta import Box
from activitypub import embed_collection from core.activitypub import embed_collection
from core.shared import MY_PERSON
from core.shared import _add_answers_to_question
from core.shared import _build_thread
from core.shared import _get_ip
from core.shared import back
from core.shared import csrf
from core.shared import login_required
from core.shared import noindex
from core.shared import paginated_query
from core.shared import post_to_outbox
from blueprints.api import _api_required from blueprints.api import _api_required
from config import ADMIN_API_KEY from config import ADMIN_API_KEY
from config import BLACKLIST from config import BLACKLIST
@ -58,9 +47,20 @@ from config import KEY
from config import ME from config import ME
from config import MEDIA_CACHE from config import MEDIA_CACHE
from config import VERSION from config import VERSION
from config import MetaKey from core import activitypub
from config import _meta from core.meta import MetaKey
from tasks import Tasks from core.meta import _meta
from core.shared import MY_PERSON
from core.shared import _add_answers_to_question
from core.shared import _build_thread
from core.shared import _get_ip
from core.shared import back
from core.shared import csrf
from core.shared import login_required
from core.shared import noindex
from core.shared import paginated_query
from core.shared import post_to_outbox
from core.tasks import Tasks
from utils import now from utils import now
from utils.key import get_secret_key from utils.key import get_secret_key
from utils.template_filters import filters from utils.template_filters import filters

View file

@ -19,7 +19,10 @@ from passlib.hash import bcrypt
from u2flib_server import u2f from u2flib_server import u2f
import config import config
from activitypub import Box from core.activitypub import Box
from config import DB
from config import ID
from config import PASS
from core.shared import MY_PERSON from core.shared import MY_PERSON
from core.shared import _build_thread from core.shared import _build_thread
from core.shared import _Response from core.shared import _Response
@ -29,9 +32,6 @@ from core.shared import noindex
from core.shared import p from core.shared import p
from core.shared import paginated_query from core.shared import paginated_query
from core.shared import post_to_outbox from core.shared import post_to_outbox
from config import DB
from config import ID
from config import PASS
from utils import now from utils import now
from utils.lookup import lookup from utils.lookup import lookup

View file

@ -23,14 +23,8 @@ from little_boxes.errors import ActivityNotFoundError
from little_boxes.errors import NotFromOutboxError from little_boxes.errors import NotFromOutboxError
from werkzeug.utils import secure_filename from werkzeug.utils import secure_filename
import activitypub
import config import config
from activitypub import Box from core.meta import Box
from core.shared import MY_PERSON
from core.shared import _Response
from core.shared import back
from core.shared import csrf
from core.shared import post_to_outbox
from config import BASE_URL from config import BASE_URL
from config import DB from config import DB
from config import DEBUG_MODE from config import DEBUG_MODE
@ -38,10 +32,16 @@ from config import ID
from config import JWT from config import JWT
from config import MEDIA_CACHE from config import MEDIA_CACHE
from config import _drop_db from config import _drop_db
from tasks import Tasks from core import activitypub
from core.meta import MetaKey
from core.meta import _meta
from core.shared import MY_PERSON
from core.shared import _Response
from core.shared import back
from core.shared import csrf
from core.shared import post_to_outbox
from core.tasks import Tasks
from utils import now from utils import now
from utils.meta import MetaKey
from utils.meta import _meta
blueprint = flask.Blueprint("api", __name__) blueprint = flask.Blueprint("api", __name__)

View file

@ -16,10 +16,10 @@ from flask import session
from flask import url_for from flask import url_for
from itsdangerous import BadSignature from itsdangerous import BadSignature
from core.shared import _get_ip
from core.shared import login_required
from config import DB from config import DB
from config import JWT from config import JWT
from core.shared import _get_ip
from core.shared import login_required
blueprint = flask.Blueprint("indieauth", __name__) blueprint = flask.Blueprint("indieauth", __name__)

View file

@ -13,22 +13,22 @@ from little_boxes.errors import NotAnActivityError
from little_boxes.httpsig import HTTPSigAuth from little_boxes.httpsig import HTTPSigAuth
from requests.exceptions import HTTPError from requests.exceptions import HTTPError
from core import gc
import activitypub
import config import config
from activitypub import Box from core.activitypub import Box
from config import DB
from core import activitypub
from core import gc
from core.meta import MetaKey
from core.meta import _meta
from core.notifications import set_inbox_flags
from core.shared import MY_PERSON from core.shared import MY_PERSON
from core.shared import _add_answers_to_question from core.shared import _add_answers_to_question
from core.shared import back from core.shared import back
from core.shared import p from core.shared import p
from core.shared import post_to_outbox from core.shared import post_to_outbox
from config import DB from core.tasks import Tasks
from core.notifications import set_inbox_flags
from tasks import Tasks
from utils import now from utils import now
from utils import opengraph from utils import opengraph
from utils.meta import MetaKey
from utils.meta import _meta
SIG_AUTH = HTTPSigAuth(config.KEY) SIG_AUTH = HTTPSigAuth(config.KEY)

View file

@ -9,7 +9,7 @@ from flask import request
from little_boxes import activitypub as ap from little_boxes import activitypub as ap
import config import config
from activitypub import Box from core.meta import Box
from config import DB from config import DB
blueprint = flask.Blueprint("well_known", __name__) blueprint = flask.Blueprint("well_known", __name__)

View file

@ -28,8 +28,8 @@ from config import ID
from config import ME from config import ME
from config import USER_AGENT from config import USER_AGENT
from config import USERNAME from config import USERNAME
from core.meta import Box
from tasks import Tasks from tasks import Tasks
from utils.meta import Box
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View file

@ -8,12 +8,12 @@ from typing import List
from little_boxes import activitypub as ap from little_boxes import activitypub as ap
import activitypub from core.meta import Box
from activitypub import Box
from config import DAYS_TO_KEEP from config import DAYS_TO_KEEP
from config import ID from config import ID
from config import ME from config import ME
from config import MEDIA_CACHE from config import MEDIA_CACHE
from core import activitypub
from utils.migrations import DB from utils.migrations import DB
back = activitypub.MicroblogPubBackend() back = activitypub.MicroblogPubBackend()

View file

@ -1,7 +1,8 @@
import pymongo import pymongo
from config import DB from config import DB
from utils.meta import _meta from core.meta import MetaKey
from utils.meta import MetaKey from core.meta import _meta
def create_indexes(): def create_indexes():

View file

@ -5,8 +5,8 @@ from urllib.parse import urlparse
from little_boxes import activitypub as ap from little_boxes import activitypub as ap
import activitypub
from config import ID from config import ID
from core import activitypub
from utils.migrations import DB from utils.migrations import DB
from utils.migrations import Migration from utils.migrations import Migration
from utils.migrations import logger from utils.migrations import logger

View file

@ -8,13 +8,13 @@ from little_boxes import activitypub as ap
from config import BASE_URL from config import BASE_URL
from config import DB from config import DB
from config import MetaKey from core.meta import MetaKey
from config import _meta from core.meta import _meta
from tasks import Tasks from core.meta import by_actor
from utils.meta import by_actor from core.meta import by_type
from utils.meta import by_type from core.meta import in_inbox
from utils.meta import in_inbox from core.meta import not_undo
from utils.meta import not_undo from core.tasks import Tasks
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)

View file

@ -19,12 +19,12 @@ from little_boxes import activitypub as ap
from little_boxes.activitypub import format_datetime from little_boxes.activitypub import format_datetime
from poussetaches import PousseTaches from poussetaches import PousseTaches
import activitypub from core.meta import Box
from activitypub import Box from core.activitypub import _answer_key
from activitypub import _answer_key
from config import DB from config import DB
from config import ME from config import ME
from tasks import Tasks from core import activitypub
from core.tasks import Tasks
_Response = Union[flask.Response, werkzeug.wrappers.Response, str] _Response = Union[flask.Response, werkzeug.wrappers.Response, str]