Django CMS Form for Anonymous User

30 Views Asked by At

I have Django CMS application and I want to give different permissions to user. Before giving permission, I want to authenticate User with LDAP backend. I have created LDAP backend and working fine. I have created login form using Django form and rendered in template. The form only appears on UI when the user is logged in using Django Admin. How can I render this form when the user is not logged in or when the user is anonymous. How do I solve this issue? Thank you. I have Django 3.1.14 and django-cms 3.8.2

code for forms:

from django import forms
class loginForm(forms.Form):
     user_name = forms.TextInput()
     password = forms.PasswordInput()

I tried to check the permission but finds permission only for plugins, I couldn't find the permission settings for form in admin interface of Django CMS. Also, I don't have any logic in template or views.py to allow forms for only authenticated user.

0

There are 0 best solutions below