Question: i am new to HAML and not able to understand old coder logic 
i try to identify where the label come on ui in HAML template
this are my code 
main view page

```
  = render :partial => "application/select_search", :locals => {:n => "benefit_stream_inf", :options => @dynamic_benefit_options, :default => true}

```

select\_search page which render in main plage

```
label = local_assigns[:l] ? l : t(n, :scope => local_assigns[:s] ? s : :models)

```

now i not give any label in render then how lable get generated 

can some one explain this label assignment code 

```
label = local_assigns[:l] ? l : t(n, :scope => local_assigns[:s] ? s : :models)

```

Answer: 
Replace

```
from django.utils.thread_support import currentThread
currentThread()

```

with

```
from threading import current_thread
current_thread()

```
For future googlers, there is now a python package that provides a much more robust version of this middleware: [django-crequest](https://pypi.org/project/django-crequest/)