132 lines
8.0 KiB
Python
132 lines
8.0 KiB
Python
"""
|
|
URL configuration for acore project.
|
|
|
|
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
https://docs.djangoproject.com/en/6.0/topics/http/urls/
|
|
Examples:
|
|
Function views
|
|
1. Add an import: from my_app import views
|
|
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
|
Class-based views
|
|
1. Add an import: from other_app.views import Home
|
|
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
|
Including another URLconf
|
|
1. Import the include() function: from django.urls import include, path
|
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
|
"""
|
|
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
|
from django.views.i18n import JavaScriptCatalog
|
|
from core import views
|
|
from core import directory_portal
|
|
from core import user_groups_portal
|
|
from apps.hiring import recruiting
|
|
from core.accounting_portal import accounting_portal_view
|
|
from apps.it_manager.billing import internet_payment_update_view
|
|
from apps.employees.views_password import password_setup_view
|
|
from apps.locations.views import pharmacy_update_view
|
|
from apps.visit_manager.views_calendar import (
|
|
calendar_event_create_view,
|
|
calendar_event_delete_view,
|
|
)
|
|
|
|
urlpatterns = [
|
|
path('acore-a-panel/', admin.site.urls),
|
|
path('i18n/', include('django.conf.urls.i18n')), # set_language для переключателя мов
|
|
path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'), # переводы для JS
|
|
path('api/attendance/', include('apps.visit_manager.api.urls')),
|
|
path('', include('apps.employees.urls')),
|
|
path('', include('apps.ad_connector.urls')),
|
|
path('', include('apps.feed.urls')),
|
|
path('', include('apps.tasks.urls')),
|
|
path('', include('apps.it_manager.urls')),
|
|
path('', include('apps.reports.urls')),
|
|
path('', include('apps.mattermost_connector.urls')),
|
|
path('', include('apps.utilities.urls')),
|
|
path('', include('apps.power_assets.urls')),
|
|
path('', include('apps.rro.urls')),
|
|
path('', include('apps.help.urls')),
|
|
path('', include('apps.nextcloud_connector.urls')),
|
|
path('', include('apps.mail_connector.urls')),
|
|
path('tinymce/', include('tinymce.urls')),
|
|
path('', views.index_view, name='index'),
|
|
path('accounts/login/', views.login_view, name='login'),
|
|
path('login/', views.login_view, name='login'),
|
|
path('logout/', views.logout_view, name='logout'),
|
|
path('set-password/<str:token>/', password_setup_view, name='password_setup'),
|
|
path('2fa/setup/', views.twofa_setup_view, name='twofa_setup'),
|
|
path('2fa/disable/', views.twofa_disable_view, name='twofa_disable'),
|
|
path('2fa/regenerate-backup/', views.twofa_regenerate_backup_view, name='twofa_regenerate_backup'),
|
|
path('2fa/backup-codes/', views.twofa_backup_codes_view, name='twofa_backup_codes'),
|
|
path('2fa/verify/', views.twofa_verify_view, name='twofa_verify'),
|
|
path('dashboard/', views.dashboard_view, name='dashboard'),
|
|
path('dashboard/customize/', views.dashboard_customize_view, name='dashboard_customize'),
|
|
path('employees/', views.employees_view, name='employees'),
|
|
path('employees/<int:pk>/', views.employee_detail_view, name='employee_detail'),
|
|
path('pharmacies/', views.pharmacies_view, name='pharmacies'),
|
|
path('dislocation/', views.dislocation_view, name='dislocation'),
|
|
path('dislocation/columns/', views.dislocation_columns_view, name='dislocation_columns'),
|
|
path('dislocation/column-presets/', views.dislocation_column_presets_view, name='dislocation_column_presets'),
|
|
path('calendar/', views.calendar_view, name='calendar'),
|
|
path('calendar/events/', calendar_event_create_view, name='calendar_event_create'),
|
|
path('calendar/events/<int:pk>/delete/', calendar_event_delete_view, name='calendar_event_delete'),
|
|
path('timetrack/', views.timetrack_view, name='timetrack'),
|
|
path('accounting/', accounting_portal_view, name='accounting_portal'),
|
|
path('accounting/internet-payment/', internet_payment_update_view, name='internet_payment_update'),
|
|
path('documents/', views.documents_view, name='documents'),
|
|
path('recruiting/', views.recruiting_view, name='recruiting'),
|
|
path('structure/', views.structure_view, name='structure'),
|
|
path('user-groups/', user_groups_portal.user_groups_list_view, name='user_groups'),
|
|
path(
|
|
'user-groups/individual-reports/',
|
|
user_groups_portal.user_group_individual_reports_grant_view,
|
|
name='user_group_individual_reports_grant',
|
|
),
|
|
path(
|
|
'user-groups/individual-reports/<int:employee_id>/revoke/',
|
|
user_groups_portal.user_group_individual_reports_revoke_view,
|
|
name='user_group_individual_reports_revoke',
|
|
),
|
|
path('user-groups/<int:group_id>/access/', user_groups_portal.user_group_access_view, name='user_group_access'),
|
|
path('user-groups/<int:group_id>/access/save/', user_groups_portal.user_group_access_save_view, name='user_group_access_save'),
|
|
path('user-groups/<int:group_id>/access/copy/', user_groups_portal.user_group_access_copy_view, name='user_group_access_copy'),
|
|
path('settings/', views.settings_view, name='settings'),
|
|
path('profile/', views.profile_view, name='profile'),
|
|
path('chat/', views.chat_view, name='chat'),
|
|
path('chat/sync/', views.chat_sync_now_view, name='chat_sync_now'),
|
|
path('databases/', views.databases_view, name='databases'),
|
|
path('databases/rebuild/', directory_portal.directory_rebuild_view, name='directory_rebuild'),
|
|
path('databases/<int:type_id>/', directory_portal.directory_type_detail_view, name='directory_type_detail'),
|
|
path('databases/<int:type_id>/save/', directory_portal.directory_item_save_view, name='directory_item_save'),
|
|
path('databases/<int:type_id>/sort-alpha/', directory_portal.directory_sort_alpha_view, name='directory_sort_alpha'),
|
|
path('databases/<int:type_id>/reorder/', directory_portal.directory_item_reorder_view, name='directory_item_reorder'),
|
|
path('purchases/', views.purchases_view, name='purchases'),
|
|
path('hr-portal/', views.hr_portal_view, name='hr_portal'),
|
|
path('vacancies/save/', recruiting.vacancy_save_view, name='vacancy_save'),
|
|
path('vacancies/<int:pk>/status/', recruiting.vacancy_set_status_view, name='vacancy_set_status'),
|
|
path('hiring/', views.hiring_create_view, name='hiring_create'),
|
|
path('hiring/<int:pk>/approve/', views.hiring_approve_view, name='hiring_approve'),
|
|
path('hiring/<int:pk>/reject/', views.hiring_reject_view, name='hiring_reject'),
|
|
path('hiring/<int:pk>/credentials.pdf/', views.hiring_credentials_pdf_view, name='hiring_credentials_pdf'),
|
|
path('hiring/<int:pk>/invite/', views.hiring_regenerate_invite_view, name='hiring_regenerate_invite'),
|
|
path('hr-requests/', views.hr_request_create_view, name='hr_request_create'),
|
|
path('hr-requests/<int:pk>/cancel/', views.hr_request_cancel_view, name='hr_request_cancel'),
|
|
path('hr-requests/<int:pk>/approve/', views.hr_request_approve_view, name='hr_request_approve'),
|
|
path('hr-requests/<int:pk>/reject/', views.hr_request_reject_view, name='hr_request_reject'),
|
|
path('hr-requests/<int:pk>/confirm-substitution/', views.hr_substitution_confirm_view, name='hr_substitution_confirm'),
|
|
path('hr-requests/<int:pk>/decline-substitution/', views.hr_substitution_decline_view, name='hr_substitution_decline'),
|
|
path('it-support/', views.it_support_view, name='it_support'),
|
|
path('directory/quick-add/', views.directory_quick_add_view, name='directory_quick_add'),
|
|
path('pharmacies/<int:pk>/', views.pharmacy_detail_view, name='pharmacy_detail'),
|
|
path('pharmacies/<int:pk>/edit/', pharmacy_update_view, name='pharmacy_update'),
|
|
path('dev/access-preview/', views.access_preview_view, name='access_preview'),
|
|
path('modal-add-employee/', views.modal_add_employee_view, name='modal_add_employee'),
|
|
]
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += staticfiles_urlpatterns()
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|