mirror of https://github.com/jumpserver/jumpserver
CAPTCHA_TEST_MODE settings and small fix
parent
3f7cb4a458
commit
31bded8953
File diff suppressed because one or more lines are too long
|
@ -14,7 +14,6 @@ import os
|
|||
import sys
|
||||
|
||||
from django.urls import reverse_lazy
|
||||
from datetime import timedelta
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
@ -322,4 +321,4 @@ CACHES = {
|
|||
# Captcha settings, more see https://django-simple-captcha.readthedocs.io/en/latest/advanced.html
|
||||
CAPTCHA_IMAGE_SIZE = (75, 33)
|
||||
CAPTCHA_FOREGROUND_COLOR = '#001100'
|
||||
|
||||
CAPTCHA_TEST_MODE = CONFIG.CAPTCHA_TEST_MODE
|
||||
|
|
|
@ -6,7 +6,6 @@ import logging
|
|||
from uuid import uuid4
|
||||
from assets.models import Asset
|
||||
from ops.models import TaskRecord
|
||||
from ops.utils.ansible_api import ADHocRunner, Config
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
@ -31,6 +30,7 @@ class Task(models.Model):
|
|||
return []
|
||||
|
||||
def run(self):
|
||||
from ops.utils.ansible_api import ADHocRunner, Config
|
||||
conf = Config()
|
||||
gather_facts = "yes" if self.is_gather_facts else "no"
|
||||
play_source = {
|
||||
|
|
|
@ -81,6 +81,8 @@ class Config:
|
|||
# EMAIL_USE_TLS = False # If port is 587, set True
|
||||
# EMAIL_SUBJECT_PREFIX = '[Jumpserver] '
|
||||
|
||||
CAPTCHA_TEST_MODE = False
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
@ -121,4 +123,3 @@ config = {
|
|||
}
|
||||
|
||||
env = 'development'
|
||||
|
||||
|
|
Loading…
Reference in New Issue