[UPDT] BASE: Updated base app by changing ThreadLocalMiddleware location to horilla project folder
This commit is contained in:
@@ -10,11 +10,11 @@ from django.forms import widgets
|
||||
from django.template.loader import render_to_string
|
||||
from django.utils.translation import gettext_lazy as trans
|
||||
|
||||
from base import thread_local_middleware
|
||||
from base.forms import Form
|
||||
from base.methods import reload_queryset
|
||||
from employee.forms import MultipleFileField
|
||||
from employee.models import Employee
|
||||
from horilla import horilla_middlewares
|
||||
from payroll.context_processors import get_active_employees
|
||||
from payroll.models.models import (
|
||||
Contract,
|
||||
@@ -34,7 +34,7 @@ class ModelForm(forms.ModelForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
reload_queryset(self.fields)
|
||||
request = getattr(thread_local_middleware._thread_locals, "request", None)
|
||||
request = getattr(horilla_middlewares._thread_locals, "request", None)
|
||||
for _, field in self.fields.items():
|
||||
widget = field.widget
|
||||
|
||||
|
||||
Reference in New Issue
Block a user