Override admin path in cli with env param
This commit is contained in:
@@ -75,7 +75,7 @@ class TranslatableMixin:
|
||||
|
||||
# Check if we're in admin context by looking at the call stack
|
||||
frames = inspect.getouterframes(inspect.currentframe())
|
||||
is_admin_context = any('admin' in frame.filename or 'forms' in frame.filename for frame in frames[:5])
|
||||
is_admin_context = os.environ.get('DJANGO_ADMIN_OVERRIDE', False) == '1' or any('admin' in frame.filename or 'forms' in frame.filename for frame in frames[:5])
|
||||
|
||||
logging.debug(f"{self.__class__.__name__} from_db_value - admin context: {is_admin_context}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user