fix [P-276]: 120
This commit is contained in:
commit
ed2e96e69e
43 files changed
+29
-63
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
env/
|
||||
/__pycache__/
|
||||
/*/__pycache__/
|
||||
/**/__pycache__/
|
||||
|
||||
/front/node_modules/
|
||||
*.sqlite3
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -54,7 +54,7 @@ class CustomAuth(ModelBackend):
|
||||
status_code=0
|
||||
|
||||
# !ТУт стучим в AD, потом к Алексею
|
||||
if myDEBUG!=True:
|
||||
if myDEBUG!="True":
|
||||
|
||||
resp= requests.post('http://10.252.44.13:8005/getAD', json.dumps({'user': username, 'password':password, 'usercheck': username}))
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,42 +0,0 @@
|
||||
from datetime import timedelta
|
||||
|
||||
import os
|
||||
|
||||
|
||||
class Settings:
|
||||
"""
|
||||
Настройки подключений - потом перенести
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""
|
||||
Настройки подключений - потом перенести
|
||||
"""
|
||||
self.secret_key = "V7bvDZMztr3EU8S9g1Dipw"
|
||||
self.redis_hosts = [f"{str(os.getenv('REDIS'))}:{str(os.getenv('REDIS_PORT'))}"]
|
||||
self.access_token_lifetime = timedelta(minutes=480)
|
||||
|
||||
self.refresh_token_lifetime = timedelta(days=1)
|
||||
|
||||
self.db = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"NAME": "portal_test", # Имя базы данных
|
||||
"USER": os.getenv("DB_USER"), # Имя пользователя
|
||||
"PASSWORD": "P@sw0rd", # Пароль
|
||||
"HOST": os.getenv("DB_HOST"), # Хост
|
||||
"PORT": os.getenv("DB_INTERNAL_PORT"), # Порт
|
||||
}
|
||||
}
|
||||
|
||||
def foo1(self) -> None:
|
||||
"""
|
||||
Настройки - потом перенести
|
||||
"""
|
||||
return None
|
||||
|
||||
def foo2(self) -> None:
|
||||
"""
|
||||
Настройки подключений - потом перенести
|
||||
"""
|
||||
return None
|
||||
@@ -12,18 +12,17 @@ https://docs.djangoproject.com/en/4.2/ref/settings/
|
||||
|
||||
from pathlib import Path
|
||||
import os
|
||||
from .ds import Settings
|
||||
stngs = Settings()
|
||||
|
||||
CORS_ORIGIN_ALLOW_ALL=True
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
LIST_PER_PAGE=25
|
||||
SECRET_KEY=stngs.secret_key
|
||||
SECRET_KEY="V7bvDZMztr3EU8S9g1Dipw"
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
myDEBUG=True
|
||||
myDEBUG=os.getenv("MYDEBUG")
|
||||
|
||||
SWAGGER_SETTINGS = {
|
||||
'DEFAULT_INFO': 'import.path.to.urls.api_info',
|
||||
@@ -46,7 +45,7 @@ CHANNEL_LAYERS = {
|
||||
"default": {
|
||||
"BACKEND": "channels_redis.core.RedisChannelLayer",
|
||||
"CONFIG": {
|
||||
"hosts":stngs.redis_hosts,
|
||||
"hosts":[f"{str(os.getenv('REDIS'))}:{str(os.getenv('REDIS_PORT'))}"]
|
||||
},
|
||||
},
|
||||
|
||||
@@ -139,7 +138,17 @@ ASGI_APPLICATION = "portal.asgi.application"
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
|
||||
|
||||
DATABASES = stngs.db
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"NAME": os.getenv("DB_NAME"), # Имя базы данных
|
||||
"USER": os.getenv("DB_USER"), # Имя пользователя
|
||||
"PASSWORD": os.getenv("DB_PASSWORD"), # Пароль
|
||||
"HOST": os.getenv("DB_HOST"), # Хост
|
||||
"PORT": os.getenv("DB_INTERNAL_PORT"), # Порт
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Password validation
|
||||
@@ -196,8 +205,8 @@ from datetime import timedelta
|
||||
|
||||
|
||||
SIMPLE_JWT = {
|
||||
"ACCESS_TOKEN_LIFETIME": stngs.access_token_lifetime,
|
||||
"REFRESH_TOKEN_LIFETIME": stngs.refresh_token_lifetime,
|
||||
"ACCESS_TOKEN_LIFETIME": timedelta(hours=4),
|
||||
"REFRESH_TOKEN_LIFETIME": timedelta(days=1),
|
||||
"ROTATE_REFRESH_TOKENS": False,
|
||||
"BLACKLIST_AFTER_ROTATION": False,
|
||||
"UPDATE_LAST_LOGIN": False,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "front",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -4,7 +4,7 @@ import { VCalendar } from 'vuetify/labs/VCalendar'
|
||||
|
||||
import { createVuetify } from 'vuetify'
|
||||
import { ru } from 'vuetify/locale'
|
||||
import { VTimePicker } from 'vuetify/labs/VTimePicker'
|
||||
|
||||
|
||||
export default createVuetify({
|
||||
|
||||
@@ -13,7 +13,7 @@ export default createVuetify({
|
||||
},
|
||||
components: {
|
||||
VCalendar,
|
||||
VTimePicker,
|
||||
|
||||
},
|
||||
theme: {
|
||||
defaultTheme: 'light',
|
||||
|
||||
@@ -3,8 +3,8 @@ import axios from "axios";
|
||||
|
||||
const spravURL = 'http://10.252.44.33/accounting6/images/photo/'
|
||||
const spravURLBase = 'http://10.252.44.33/accounting6/'
|
||||
const baseURL = process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:8000/' : `http://${window.location.host}/`;
|
||||
const baseWS = process.env.NODE_ENV === 'development' ? 'ws://localhost/' : `ws://${window.location.host}/`;
|
||||
const baseURL = `http://${window.location.host}/`;
|
||||
const baseWS = `ws://${window.location.host}/`;
|
||||
// const baseURL = process.env.NODE_ENV == 'development'? 'http://127.0.0.1:8000/': `http://10.252.44.60:9965/`;
|
||||
// const baseWS = process.env.NODE_ENV == 'development'? 'ws://127.0.0.1:8000/': `ws://10.252.44.60:9966/`;
|
||||
// для релизного меняем 'http://ukd/'
|
||||
|
||||
Reference in new issue
Block a user