[UPDT employee urls for getting language]

This commit is contained in:
Horilla
2023-08-07 13:04:36 +05:30
parent b745ab1897
commit abdb7a57bc
2 changed files with 5 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ from django.urls import path
from employee import views
urlpatterns = [
path("get-language-code/", views.get_language_code, name="get-language-code"),
path("employee-profile", views.employee_profile, name="employee-profile"),
path(
"employee-view/<int:obj_id>/",

View File

@@ -55,7 +55,10 @@ from employee.models import Employee, EmployeeWorkInformation, EmployeeBankDetai
# Create your views here.
@login_required
def get_language_code(request):
language_code = request.LANGUAGE_CODE
return JsonResponse({"language_code": language_code})
@login_required
def employee_profile(request):