Merge branch 'develop' into feature/logging/func
# Conflicts: # main/extra_func.py # main/models.py # main/views.py
This commit is contained in:
@@ -9,8 +9,9 @@ https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
|
||||
|
||||
import os
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'access_controller.settings')
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
application = get_asgi_application()
|
||||
|
||||
@@ -24,7 +24,7 @@ SECRET_KEY = 'v1i_fb$_jf2#1v_lcsbu&eon4u-os0^px=s^iycegdycqy&5)6'
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
ALLOWED_HOSTS = ['127.0.0.1']
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -36,6 +36,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'django_registration',
|
||||
'rest_framework',
|
||||
'main',
|
||||
]
|
||||
|
||||
@@ -149,4 +150,21 @@ ZENDESK_ROLES = {
|
||||
'light_agent': 360005208980,
|
||||
}
|
||||
|
||||
ZENDESK_GROUPS = {
|
||||
'employees': 'Поддержка',
|
||||
'buffer': 'Сменная группа',
|
||||
}
|
||||
|
||||
SOLVED_TICKETS_EMAIL = 'd.krikov@ngenix.net'
|
||||
|
||||
ZENDESK_MAX_AGENTS = 3
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
# Use Django's standard `django.contrib.auth` permissions,
|
||||
# or allow read-only access for unauthenticated users.
|
||||
'DEFAULT_PERMISSION_CLASSES': [
|
||||
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
|
||||
]
|
||||
}
|
||||
|
||||
ONE_DAY = 12 # Количество часов в 1 рабочем дне
|
||||
|
||||
@@ -20,18 +20,22 @@ from django.urls import path, include
|
||||
from main.views import main_page, profile_page, CustomRegistrationView, CustomLoginView
|
||||
from main.views import work_page, work_hand_over, work_become_engineer, \
|
||||
AdminPageView, statistic_page
|
||||
from main.urls import router
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls, name='admin'),
|
||||
path('', main_page, name='index'),
|
||||
path('accounts/profile/', profile_page, name='profile'),
|
||||
path('accounts/register/', CustomRegistrationView.as_view(), name='registration'),
|
||||
path('accounts/login/', CustomLoginView.as_view(extra_context={}), name='login',), # TODO add extra context
|
||||
path('accounts/login/', CustomLoginView.as_view(), name='login'),
|
||||
path('accounts/', include('django.contrib.auth.urls')),
|
||||
path('accounts/', include('django_registration.backends.one_step.urls')),
|
||||
path('work/<int:id>', work_page, name="work"),
|
||||
path('work/hand_over/', work_hand_over, name="work_hand_over"),
|
||||
path('work/become_engineer/', work_become_engineer, name="work_become_engineer"),
|
||||
path('accounts/', include('django_registration.backends.activation.urls')),
|
||||
path('accounts/login/', include('django.contrib.auth.urls')),
|
||||
path('control/', AdminPageView.as_view(), name='control'),
|
||||
path('statistic/', statistic_page, name='statistic')
|
||||
]
|
||||
@@ -58,3 +62,8 @@ urlpatterns += [
|
||||
name='password_reset_complete'
|
||||
),
|
||||
]
|
||||
|
||||
# Django REST
|
||||
urlpatterns += [
|
||||
path('api/', include(router.urls))
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user