core: use consistent import for get_current_request

This commit is contained in:
RhodeCode Admin 2024-12-10 07:36:38 +01:00
parent 2433f3fbfc
commit 107b31a78f
14 changed files with 20 additions and 17 deletions

View file

@ -49,7 +49,7 @@ from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.exc import IntegrityError # pragma: no cover
from sqlalchemy.dialects.mysql import LONGTEXT
from zope.cachedescriptors.property import Lazy as LazyProperty
from pyramid.threadlocal import get_current_request
from webhelpers2.text import remove_formatting
from rhodecode import ConfigGet
@ -71,6 +71,7 @@ from rhodecode.lib.ext_json import json, str_json
from rhodecode.lib.caching_query import FromCache
from rhodecode.lib.exceptions import (
ArtifactMetadataDuplicate, ArtifactMetadataBadValueType)
from rhodecode.lib.pyramid_utils import get_current_request
from rhodecode.model.meta import Base, Session
URL_SEP = '/'

View file

@ -46,7 +46,7 @@ import formencode
from pkg_resources import resource_filename
from formencode import All, Pipe
from pyramid.threadlocal import get_current_request
from rhodecode.lib.pyramid_utils import get_current_request
from rhodecode import BACKENDS
from rhodecode.lib import helpers

View file

@ -26,7 +26,7 @@ import logging
import traceback
import shutil
from pyramid.threadlocal import get_current_request
from rhodecode.lib.pyramid_utils import get_current_request
from rhodecode.lib.utils2 import (
unique_id, safe_int, safe_str, time_to_datetime, AttributeDict)

View file

@ -31,7 +31,7 @@ import urllib.error
import collections
import dataclasses as dataclasses
from pyramid.threadlocal import get_current_request
from rhodecode.lib.pyramid_utils import get_current_request
from rhodecode.lib.vcs.nodes import FileNode
from rhodecode.translation import lazy_ugettext

View file

@ -24,7 +24,6 @@ import logging
import traceback
import datetime
from pyramid.threadlocal import get_current_request
from sqlalchemy.orm import aliased
from zope.cachedescriptors.property import Lazy as LazyProperty
@ -35,6 +34,7 @@ from rhodecode.lib.exceptions import AttachedForksError, AttachedPullRequestsErr
from rhodecode.lib import hooks_base
from rhodecode.lib.str_utils import safe_bytes
from rhodecode.lib.user_log_filter import user_log_filter
from rhodecode.lib.pyramid_utils import get_current_request
from rhodecode.lib.utils import make_db_config
from rhodecode.lib.utils2 import (
safe_str, remove_prefix, obfuscate_url_pw,

View file

@ -719,7 +719,7 @@ class RepoGroupModel(BaseModel):
def get_repo_groups_as_dict(self, repo_group_list=None, admin=False,
super_user_actions=False):
from pyramid.threadlocal import get_current_request
from rhodecode.lib.pyramid_utils import get_current_request
_render = get_current_request().get_partial_renderer(
'rhodecode:templates/data_table/_dt_elements.mako')
c = _render.get_call_context()

View file

@ -23,8 +23,7 @@ import time
import functools
from collections import namedtuple
from pyramid.threadlocal import get_current_request
from rhodecode.lib.pyramid_utils import get_current_request
from rhodecode.lib import rc_cache
from rhodecode.lib.hash_utils import sha1_safe
from rhodecode.lib.html_filters import sanitize_html

View file

@ -25,10 +25,10 @@ import traceback
import datetime
import ipaddress
from pyramid.threadlocal import get_current_request
from sqlalchemy.exc import DatabaseError
from rhodecode import events
from rhodecode.lib.pyramid_utils import get_current_request
from rhodecode.lib.user_log_filter import user_log_filter
from rhodecode.lib.utils2 import (
get_current_rhodecode_user, action_logger_generic,