Open bdbais opened 4 years ago
I've installed this module to try, on admin site I created a form and save it, when I viewed on site it send me this error:
'bool' object is not callable
File "projectX\venv\lib\site-packages\forms_builder\forms\views.py" in get
Exception Type: TypeError at /forms_builder/test-form-builder/ Exception Value: 'bool' object is not callable
-------------- Possible fix: forms_builder\forms\views.py
def get(self, request, *args, **kwargs): context = self.get_context_data(**kwargs) login_required = context["form"].login_required username = request.POST.get('username') password = request.POST.get('password') user = authenticate(username=username, password=password) if login_required and user is not None: #if login_required and not request.user.is_authenticated(): path = urlquote(request.get_full_path()) bits = (settings.LOGIN_URL, REDIRECT_FIELD_NAME, path) return redirect("%s?%s=%s" % bits) return self.render_to_response(context)
You need to import too:
from django.contrib.auth import authenticate
Github source is not having this issue.
I've installed this module to try, on admin site I created a form and save it, when I viewed on site it send me this error:
'bool' object is not callable
File "projectX\venv\lib\site-packages\forms_builder\forms\views.py" in get
Exception Type: TypeError at /forms_builder/test-form-builder/ Exception Value: 'bool' object is not callable
-------------- Possible fix: forms_builder\forms\views.py