hotel import template

This commit is contained in:
2024-12-13 22:25:11 +09:00
parent 93964af71a
commit 3c6f849b78
28 changed files with 10049 additions and 178 deletions

View File

@@ -27,8 +27,12 @@ SECRET_KEY = 'django-insecure-l_8uu8#p*^zf)9zry80)6u+!+2g1a4tg!wx7@^!uw(+^axyh&h
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ['0.0.0.0', '192.168.219.140', '127.0.0.1', '192.168.219.114']
ALLOWED_HOSTS = ['0.0.0.0', '192.168.219.140', '127.0.0.1', '192.168.219.114', 'c710-182-226-158-253.ngrok-free.app']
CSRF_TRUSTED_ORIGINS = [
'https://c710-182-226-158-253.ngrok-free.app',
'https://*.ngrok.io', # Это подойдет для любых URL, связанных с ngrok
]
# Application definition
@@ -45,7 +49,11 @@ INSTALLED_APPS = [
'hotels',
'users',
'scheduler',
'antifroud'
'antifroud',
'health_check',
'health_check.db',
'health_check.cache',
]
MIDDLEWARE = [
@@ -114,30 +122,46 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
# settings.py
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'file': {
'level': 'WARNING',
'class': 'logging.FileHandler',
'filename': 'import_hotels.log', # Лог будет записываться в этот файл
},
},
'root': {
'handlers': ['console'],
'level': 'WARNING',
'loggers': {
'django': {
'handlers': ['file'],
'level': 'WARNING',
'propagate': True,
},
'antifroud': {
'handlers': ['file'],
'level': 'WARNING',
'propagate': True,
},
},
}
# Internationalization
# https://docs.djangoproject.com/en/5.1/topics/i18n/
LANGUAGE_CODE = 'ru-RU'
LANGUAGE_CODE = 'ru'
TIME_ZONE = 'UTC'
TIME_ZONE = 'Europe/Moscow'
USE_TZ = True
USE_I18N = True
USE_TZ = True
USE_L10N = True
# Static files (CSS, JavaScript, Images)
@@ -155,28 +179,28 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
JAZZMIN_SETTINGS = {
"use_bootstrap5": True,
"site_title": "TOUCHH Hotel Management",
"site_header": "TOUCHH Hotel Manager Admin",
"site_brand": "TOUCHH",
"welcome_sign": "Welcome to TOUCHH Hotel Management System",
"show_sidebar": True,
"navigation_expanded": True,
"hide_models": ["users", "guests"],
"navigation_expanded": False,
"hide_models": ["auth.Users", "guests"],
"site_logo": None, # Путь к логотипу, например "static/images/logo.png"
"site_logo_classes": "img-circle", # Классы CSS для логотипа
"site_icon": None, # Иконка сайта (favicon), например "static/images/favicon.ico"
"welcome_sign": "Welcome to Touchh Admin", # Приветствие на странице входа
"copyright": "Touchh © 2024", # Кастомный текст в футере
"search_model": "auth.User", # Модель для строки поиска
"copyright": "Touchh", # Кастомный текст в футере
"icons": {
"auth": "fas fa-users-cog",
"users": "fas fa-user-circle",
"hotels": "fas fa-hotel",
},
"theme": "flatly",
"dark_mode_theme": "cyborg",
"theme": "sandstone",
"dark_mode_theme": "darkly",
"footer": {
"copyright": "Touchh © 2024",
"copyright": "SmartSolTech.kr © 2024",
"version": False,
},
"dashboard_links": [

View File

@@ -1,6 +1,12 @@
from django.contrib import admin
from django.urls import path, include
from antifroud import views
app_name = 'touchh'
urlpatterns = [
path('admin/', admin.site.urls),
path('health/', include('health_check.urls')),
path('antifroud/', include('antifroud.urls')),
]