#custom context processor not recognized

1 messages · Page 1 of 1 (latest)

dusk parcel
#

In my app directory, I have created custom_context_processors.py, here is the content of it:

`from .forms import LoginForm

def login_form_renderer(request):
form = LoginForm()
return {'custom_login_form': form, }`

and then, in my project's** settings.py** I have added it below context_processors, as follows:
'app_name.custom_context_processors.login_form_renderer',

and finally, I use it in base.html as follows:
{% custom_login_form %}

and that's when I get the following error:
Invalid block tag on line 74: 'custom_login_form'. Did you forget to register or load this tag?

I am using Django 5.0.1
Any help?

fluid minnow
#

and finally, I use it in base.html as follows:
{% custom_login_form %}
What made you think it's used this way?

#

Also please see #readme-1st on proper code formatting

#

Did you just confused the DTL syntax?

dusk parcel
fluid minnow
#

{{ custom_login_form }}

#

{% %} is for tags

#

they work differently and added to templates differently

dusk parcel
#

omg

#

you are a lifesaver

#

it is working now.. thank you so much

dusk parcel
#

sorry about the formatting too..